Arduino and Flash

Whenever you download a sketch into the Arduino, it is loaded into Flash memory.

  1. Whatever your program does, it is exectuting from the Flash memory.
  2. You can use analogRead() on 6 specific pins to read a voltage. You can use analogWrite() on 6 specific pins to output a PWM signal. With a simple Resistor/Capacitor filter (low pass filter) this can look like a DC voltage level.
  3. Examples are in the IDE, look in the commands across the top.
  4. Try some of the example sketches, and in the Learning section, to read an input to see if a button is pressed, and take actions from there.