• Save
Three Easy Pieces For The TouchShield
Upcoming SlideShare
Loading in...5
×
 

Three Easy Pieces For The TouchShield

on

  • 3,983 views

A little presentation about the different ways to program the TouchShield Stealth and Slide. There's a beginner, intermediate, and advanced "level", but really the major difference is how optimized ...

A little presentation about the different ways to program the TouchShield Stealth and Slide. There's a beginner, intermediate, and advanced "level", but really the major difference is how optimized the code will be...

Statistics

Views

Total Views
3,983
Views on SlideShare
3,419
Embed Views
564

Actions

Likes
0
Downloads
0
Comments
0

33 Embeds 564

http://antipastohw.blogspot.com 425
http://antipastohw.blogspot.de 19
http://antipastohw.blogspot.fr 14
http://antipastohw.blogspot.ca 12
http://www.slideshare.net 11
http://antipastohw.blogspot.co.uk 10
http://antipastohw.blogspot.in 9
http://antipastohw.blogspot.com.br 8
http://antipastohw.blogspot.com.au 8
http://antipastohw.blogspot.com.es 7
http://antipastohw.blogspot.mx 5
http://antipastohw.blogspot.it 4
http://antipastohw.blogspot.se 3
http://antipastohw.blogspot.no 3
http://antipastohw.blogspot.be 2
http://antipastohw.blogspot.sg 2
http://antipastohw.blogspot.com.ar 2
http://antipastohw.blogspot.fi 2
http://antipastohw.blogspot.ro 2
http://antipastohw.blogspot.pt 2
http://antipastohw.blogspot.co.nz 2
http://antipastohw.blogspot.ru 1
http://antipastohw.blogspot.ch 1
http://antipastohw.blogspot.cz 1
http://antipastohw.blogspot.nl 1
http://antipastohw.blogspot.co.at 1
http://antipastohw.blogspot.kr 1
http://antipastohw.blogspot.co.il 1
http://antipastohw.blogspot.gr 1
http://www.blogger.com 1
http://static.slidesharecdn.com 1
http://static.slideshare.net 1
http://antipastohw.blogspot.hu 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Three Easy Pieces For The TouchShield Three Easy Pieces For The TouchShield Presentation Transcript

    • Three easy pieces: 3 ways to program the TouchShield Advanced
      • TouchShield low level graphics drawing functions
      • Arduino code optional, may not even be needed at all
      • TouchShield contains full graphics program, with touch screen providing I/O
      • May use low level C macros to optimize pixel drawing
      • OLED hardware function calls let you access bit and pixel-level optimizations like testing whether a certain pixel is set
      Intermediate
      • TouchShield runs its own program
      • Arduino runs its own program
      • Arduino and TouchShield communicate with each other over serial when they need to share data
      • Uses SubProcessing calls on the TouchShield
      • Arduino spends most of its time polling I/O and sending values up to the TouchShield (like from the InputShield)
      Beginner
      • TouchShield programmed with SubProcessing, acting like a canvas
      • Arduino generates serial function calls and sends commands to the TouchShield
      • TouchShield acts like a canvas for SubProcessing, a subset of the Processing Graphics language
      • Arduino sends serial drawing commands
      • Display speeds as fast as a serial connection (e.g. 9600 baud)
      1 2 3
    • The easiest way is to use the TouchShield as a SubProcessing graphics canvas Beginner
      • TouchShield programmed with SubProcessing, acting like a canvas
      • Arduino generates serial function calls and sends commands to the TouchShield
      • TouchShield acts like a canvas for SubProcessing, a subset of the Processing Graphics language
      • Arduino sends serial drawing commands
      • Display speeds as fast as a serial connection (e.g. 9600 baud)
      1 TouchShield Arduino void setup(void){ } void loop(void){ beginCanvas(); } void setup(void){ mySerial.begin(9600); background(0); fill(0); stroke(255,0,0); } void loop(void){ rect(10,10,25,25); } When you want to write a sketch, just change the Arduino's program
    • To get more speed and flexibility, write separate programs for the TouchShield and Arduino Intermediate
      • TouchShield runs its own program
      • Arduino runs its own program
      • Arduino and TouchShield communicate with each other over serial when they need to share data
      • Uses SubProcessing calls on the TouchShield
      • Arduino spends most of its time polling I/O and sending values up to the TouchShield (like from the InputShield)
      2 TouchShield Arduino void setup(void){ Serial.begin(9600); } void loop(void){ buttonValue = Serial.read(); if (buttonValue) rect(10,10,25,25); } AFSoftSerial mySerial = AFSoftSerial(RXPIN, TXPIN); void setup(void){ mySerial.begin(9600); } void loop(void){ serial_sendDigital(getInputShieldButton(1)); } When you want to write a sketch, change the graphics on the TouchShield, and the base program on the Arduino
    • And to really push the limits, go down into the OLED hardware functions of the TouchShield... Advanced
      • TouchShield low level graphics drawing functions
      • Arduino code optional, may not even be needed at all
      • TouchShield contains full graphics program, with touch screen providing I/O
      • May use low level C macros to optimize pixel drawing
      • OLED hardware function calls let you access bit and pixel-level optimizations like testing whether a certain pixel is set
      3 TouchShield Arduino void setup(void){ } void loop(void){ LCD_CTRL_PORT |= (1 << LCD_WR); LCD_DATA_MED_DDR = 0x00; } void setup(void){ } void loop(void){ } Have fun!