https://www.arduino.cc/en/software
User Interface
User Interface
**Use Example Code to Learn the Basics of Arduino
Fading an LED
Fading an LED
Fading An LED: Connection
- Connect LED to pin 11 and GND
- Pins 3,5,6,9,10,11 are PWM pins
- Can simulate Voltages between 0V and 5V.
Fading An LED: Analog Blink
- Comment out //digitalWrite code and insert analogWrite instead.
- HIGH and LOW are replaced with a range from 0 to 255. (LOW = OFF = 0 | HIGH = ON = 255)
- Analog OUTPUTS are 2^8 bit information, aka 256 values, 0-255 inclusive.
Fading An LED: For Loops
- Use a for loop to repeat a command or process through an iteration.
- for loops require the use of { }
- Here we will have our LED Fade ON.
Fading An LED: Fading On and Off
- Copy the for Loop you use to Fade On the LED and change the parameters to go in the opposite direction.