Reading a Potentiometer (analog input) ......................................................................... 2
Code .......................................................................................................................... 2 The "Hello World!" of Physical Computing................................................................... 4
Code .............................................................................................................................. 4 Blinking an LED without using the delay() function...................................................... 6 Code ................................................................................................................................ 6 Pushbutton....................................................................................................................... 9 Switch ........................................................................................................................... 11
Circuit .................................................................................................................... 11
Code ........................................................................................................................ 11 Interfacing a Joystick .................................................................................................... 13 Knock Sensor................................................................................................................ 16
Representing the Knock in Processing .................................................... 17 Memsic 2125 Accelerometer ........................................................................................ 19
PING range finder................................................................................................. 22 Play Melody.................................................................................................................. 24
Example 1: Play Melody .................................................................................. 24 Keyboard Serial ............................................................................................................ 29 LCD Display - 8 bits..................................................................................................... 31 Unipolar Stepper Motor ................................................................................................ 34
Example 1: Simple example .......................................................................... 34
Example 2: Stepper Unipolar Advanced.................................................. 35
References............................................................................................................ 37