The class was very fast paced. We started with electricity (learn more here) and the Arduino. We want understand that we are controlling electrical pressure and keep that in mind as we create our circuits. After that we connected our Arduinos and made sure we could load code in. After we had the LED blinkiing on the Arduino board it was time to set up our breadboard. We ran power and ground from the Arduino along both sides of the breadboard and then we created the LED driver circuit. Now the blink code we loaded is blinking the LED on the breadboard and we have prototyped hardware.
Next we went over the handout. We looked at Digital Output which we already used in the blink code (examples/basics/blink). We also looked at creating a blink without using a Delay command (example/digital/BlinkWithoutDelay). We looked at Digital Input which we would use to detect a button press (examples/digital/button).
Next we looked at AnalogWrite (examples/analog/fading). The Arduino creates an analog effect using Pulse Width Modulation and we saw the Arduino fade an LED. We looked at the AnalogRead command (examples/analog/AnalogInput) and connected the Arduino to a Potentiometer and a light sensor. We also talked about using Variables and two control structures; if and for loops.
We finished up by using the Serial Port Monitor to see what the Arduino is thinking (examples/basics/digitalReadSerial). Using the serial port monitor can be invaluable in debugging your projects.
Now you know how to use many of the capabilities of the Arduino. Your next step should be putting some of them together. Consider creating an interactive night light. The most basic version would turn on when it is dark and have only a light sensor and an LED. You can power the Arduino either from a USB charger like the ones included with many phones or with the battery pack connected directly to power and ground on the breadboard.
You can make the project more advanced by adding these features:
- A knob that sets the sensitivity of the light sensor.
This is just another AnalogRead and you would use that value to determine when the light sensor triggers the LED. - Have the LEDs fade up when they turn on and fade down when they turn off.
- A button that chooses which LEDs turn on when it is dark so you can change the color of the night light.
Thank you and please tell me if you would like a more advanced Arduino class.