TouchShield - Version: 412

Processing is the language of the TouchShield as programmed through the Arduino Environment for Windows and Mac.




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)

text() – for printing char[], int, long, and float types to the screen



Input

Touchscreen
gettouch() – Check the touch screen for a press at a pixel location
mouseX – Stored variable when “gettouch()” is called (X location of press)
mouseY – Stored variable when “gettouch()” 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/elipse 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() – Stores 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

Fonts
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 at jove.rutgers.edu


Simple Example

MikeExample – getting started with my stealth and slide

Hardware Description

TouchShield Slide:

Low level pin register descriptions


The LiquidWare TouchShield and TouchSlide are add on shields for the Arduino family of processors. They are both fully compatibable with the Arduino develmpment environment. A full graphics library is provided to draw lines, colors, shapes and images on the screen. The library is comptible with the Processing graphics language and an Mac QuickDraw style command set is in the works













































TouchShield TouchSlide
Size (Pixels) 128×128 320×240
Size (inches) 1.50 inch diagonal 3.00 inch diagonal
Technology OLED – Organic LED
On board CPU ATMEGA 645 ATMEGA 2560
Program Memory 64K 256K
Inteface Only Uses Arduino Pins: 2 and 3
Data Storage 16 megbit (2 megbyte)
on board FLASH For storing images or data
Holds 40 128×128 bitmap images
ATMEL AT45DB161D chip
Colors 262K (6 bit R G B)




Edit History