Module 7 - The Lamp

It's now time to program your Arduino board for the nightlight.

The Arduino IDE

All the lessons so far have used JavaScript and the Johnny-Five library to control the electronic components.  You have been writing code on your computer and executing it with Node.JS running on the computer.  If you want the lamp to work on it's own, that is without your computer, you will need write code in the C language and upload it to your Arduino.  Just remember, when the lamp code (C Code) is uploaded to the Arduino, the Arduino won't be able to recognize the Johnny-Five commands anymore.  If you want to re-use your Arduino with Johnny-five, you will need to upload the Standard Firmata program, just like you did in the setup volume.

1. Download the code here:

Download the file into a folder of your choice.  Then extract the file rgb_lamp.ino from the Zip.

2. Start the Arduino Software


3. In the Arduino IDE open your rgb_lamp.ino sketch

4. Select your port


5. Upload the code to the Arduino board.