Arduino Analog Sensors: Push Button Monitoring |
The simplest form of a changing analog reading might be the monitoring of a push button, held low by a pull down resistor. When the button is pressed the reading jumps to 255 as the analog pin reads 5V. This two state result could have been achieved with any of the digital pins, but it serves as an example nonethless.
Stripping the problem down to its most simplest form (having the Arduino place one of only two different byte values of 0 and 255 on the Serial port and retrieving them in Processing) is instructive for a number of reasons. Issues to gain familiarity with,