This week we started digging into the Arduino Starter Kit. Our initial move was to write code to make the on board LED flash to understand the core concept of the Arduino IDE and the associate programming language. The Arduino is a simple microcontroller that was created for building digital devices and interactive objects that can sense and control objects in the physical world. The programs written in the Arduino IDE are called Sketches that are later compiled to binary machine code for the Arduino processor. The basic setup of a sketch contains two functions; the setup and the loop.
The setup function runs only when the arduino is powered on and is used to configure the digital pins and load any libraries or define global variables as needed for the sketch. The loop function runs continually after the setup is complete and contains the arguments that will be the foundation of the sketch. The final code that makes the onboard
We then proceeded to wire an electrical circuit using an LED, 200Ω resistor, push button, and a solderless breadboard. This requires no code as it is a simple circuit.
Then, to put this all together, we completed Project 02: Spaceship Interface. The basic idea is that the arduino will turn on the green LED, but if the button is pressed it will turn off the green LED and alternate between the two red LEDs.
Once we had this working we played with the code to change the timing and functionality of the sketch.
Before next week each student will be required to complete Project 03: Love-o-Meter to measure how hot-blooded they are.This project utilizes a TMP36 temperature sensor to measure how warm skin is. The setup code sets the baseline temperature for the room, then in the loop it check the temperature being collected by the sensor, as the temperature increases/decreases additional LEDs are turned on/off. So if you hold the sensor, as your body temperature increases the temperature the sensor is collecting, you will see the LEDs light up in sequence.
Next week in class we will work on Project 04 Color Mixing Lamp to produce any color with a lamp that uses light as an input and Project 05 Mood Cue to clue people in to how they are doing.