TouchShield

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 download section to grab the IDE.

Additional tutorials and examples are available inside the IDE under the File->Examples menu.

Quick Example

MikeExample – Getting started with my TouchShield Slide



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() – Detect a single touch
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
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
PImage – Type for a new image
loadImage() – Load a 24-bit bitmap image from flash memory
image() – Draw the image on screen
open(FlashTransfer) – The TouchShield will wait for images to be uploaded from the IDE. Here is a demo

Typography

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

Brightness

setBrightness() – for changing the pixel brightness of the display

Gadget

Serial
beginCanvas() – Accept drawing functions from the Arduino (this function isn’t really used any more)
delay() – Delay for a specified amount of time (in msecs)
random() – Generates a random number (long number)

Hardware Description

Pins – Explains what pins the TouchShield uses on the Arduino

TouchShield Slide:

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

TouchShieldTouchSlide
Size (Pixels)128×128320×240
Size (inches)1.50 inch diagonal3.00 inch diagonal
TechnologyOLED – Organic LED
On board CPUATMEGA 645ATMEGA 2560
Program Memory64K256K
InterfaceOnly Uses Arduino Pins: 2 and 3
Data Storage16 megbit (2 megbyte) on board FLASH For storing images or dataHolds 40 128×128 bitmap images ATMEL AT45DB161D chip
Colors62K (6 bit R G B)




Edit History