<?xml version="1.0" encoding="UTF-8"?>
<wikipage>
  <body>*TouchShield Description*

The Liquidware TouchShield and TouchSlide are add on shields for the Arduino family of processors. They are both fully compatible with the Arduino development environment. A full graphics library is provided to draw lines, colors, shapes and images on the screen. The library is compatible with the Processing graphics language and an Mac QuickDraw style command set is in the works

*Software API Reference*

Processing is the language of the TouchShield as programmed through the Arduino Environment Windows and Mac. See the software &quot;download section&quot;:http://www.liquidware.com/wikipages/1 to grab the IDE.


*Gadget*

_Serial_
[beginCanvas()] - Accept drawing functions from the Arduino
[delay()] - Delay for a passed millisecond amount of time 
[random()] - Generates a random number (long number)


*Input*

_Touchscreen_
[gettouch()] - Check the touch screen for a press at a pixel location
[mouseX] - Stored variable when &quot;gettouch()&quot; is called (X location of press)
[mouseY] - Stored variable when &quot;gettouch()&quot; is called (Y location of press)
[touch_get_cursor()] - old style single press
[touch_calibrate()] - Reset the previous calibration and prompt a recalibration


*Shape*

_2D Primitives_
[ellipse()] - Draws an ellipse of a user specified size and location
[line()] - Draw a line from point to point
[point()] - Draw a single pixel
[rect()] - Draw a rectangle with a specified beginning point, width and height
[triangle()] - Draw a triangle with three specified points
[quad()] - Draw a polygon with 4 specified lines from 4 specified points
[size()] - for clipping shapes
new for version 1.1.1
[bezeir()] draw a bezeir curve
[arc()] draw a partial circle/ellipse from start angle to end angle


*Color*

_Setting_
[background()] - Color the whole screen any of 16,777,216 different colors
[fill()] - Sets the color used to fill the inside shapes
[nofill()] - Will allow a shape to be drawn with nothing filled in the inside
[stroke()] - Sets the color of shape outlines or text
[noStroke()] - Allows a shape to be drawn without an outline drawn
[strokeWeight()] - changes the outline thickness of an ellipse or rectangle


*Image Uploading*

[open(FlashTransfer)] - The TouchShield will wait in this function till an image is uploaded to the device

loadImage(&quot;.bmp&quot;) - refers to an image store on the flash chip
image(loadImage(&quot;.bmp&quot;),0,0) - Paints the image at point 0,0
PImage - Define an image as a variable
&quot;Blog Demo&quot;:http://antipastohw.blogspot.com/2009/03/uploading-touchshield-images-with.html


*Typography*

[text()] - for printing char[], int, long, and float types to the screen


*Simple Example*

[MikeExample] - getting started with my stealth and slide

{{http://www.liquidware.com/wfiles/95/medium/stealth_core.jpg?1237916813}}

*Hardware Description*

[Pins] - Explains what pins the TouchShield uses on the Arduino

TouchShield Slide:
{{http://www.liquidware.com/wfiles/70/medium/SlidePins.bmp?1233290971}}
Low level pin register descriptions


*Low Level Functions*

[HersheyDrawCString()] Draw vector font based on Hershey font data. Scaling and rotating supported, pen size not.

If you have questions or need any additions to these routines, please email msproul@jove.rutgers.edu

&lt;center&gt;&lt;table border=&quot;1&quot;&gt;&lt;tr&gt;&lt;th scope=&quot;col&quot;&gt;&lt;/th&gt;&lt;th scope=&quot;col&quot;&gt;TouchShield&lt;/th&gt;&lt;th scope=&quot;col&quot;&gt;TouchSlide&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Size (Pixels)&lt;/th&gt;&lt;td align=&quot;center&quot;&gt;128 x 128&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;320 x 240&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Size (inches)&lt;/th&gt;&lt;td align=&quot;center&quot;&gt;1.50 inch diagonal&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;3.00 inch diagonal&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Technology&lt;/th&gt;&lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt;OLED - Organic LED&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;On board CPU&lt;/th&gt;&lt;td align=&quot;center&quot;&gt;ATMEGA 645&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;ATMEGA 2560&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Program Memory&lt;/th&gt;&lt;td align=&quot;center&quot;&gt;64K&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;256K&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Interface&lt;/th&gt;&lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt;Only Uses Arduino Pins: 2 and 3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Data Storage&lt;/th&gt;&lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt;16 megbit (2 megbyte) on board FLASH For storing images or dataHolds 40 128 x 128 bitmap images ATMEL AT45DB161D chip&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th scope=&quot;row&quot;&gt;Colors&lt;/th&gt;&lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt;62K (6 bit R G B)&lt;/td&gt;&lt;/tr&gt;&lt;/TABLE&gt;&lt;/center&gt;
</body>
  <created-at type="datetime">2008-12-11T12:02:20-05:00</created-at>
  <id type="integer">15</id>
  <title>TouchShield</title>
  <updated-at type="datetime">2010-02-17T23:22:00-05:00</updated-at>
  <version type="integer">101</version>
</wikipage>
