Building Connected Things with Node.js, Johnny-Five, and Microsoft Azure
Setting Up Your Arduino
Table of Contents
- Table of Contents
- Bill of Materials
- Install the Arduino IDE
- Upload the Standard Firmata to your Arduino
- Conclusion & Next Steps
For this lab series you are using an Arduino Uno or SparkFun RedBoard programmed with Arduino. These are excellent prototyping boards for Things, but neither of them has Wi-Fi capabilities built in. If you pursue prototyping a real Thing you can still use these boards, and add Wi-Fi capabilities to them through additional components (e.g. Wi-Fi shields). This lab series is designed to teach you how to build an IoT solution using the gsateway patterm, similar to how consumer products like SmartThings, Lowes Iris, or Phillips Hue works. For the first few labs you will learn how to create Node.js applications that run on your PC and controls the baord through a USB connection. If you choose to continue with these labs on your own, you will learn how to deploy the Node.js applications to a gateway device capable of running the Node.js application, such as a Raspberry Pi or an Arduino Yún.
Bill of Materials
The following hardware is needed to complete these labs with the Arduino:
- SparkFun RedBoard Programmed with Arduino - $19.95 or Arduino Uno R3 - $24.95
- USB cable to connect the Arduino to your computer (the type will vary depending on the Arduino board you are using)
Install the Arduino IDE
While you won’t use the Arduino IDE very much in the set of labs, it is necessary for a couple of things. For one thing, installing the Arduino IDE also installs the USB drivers for the Arduino board.
Go to http://www.arduino.cc and follow the links to download the latest version of the Arduino IDE. Make sure that the checkbox for the USB driver is selected during install (it typically is by default).
Upload the Standard Firmata to your Arduino
For this lab series you will use tools that require your Arduino to have the Standard Firmatta loaded. Fortunately, this is easy to do using the Arduino IDE.
- Connect your Arduino board via USB to your computer.
- Open the Arduino IDE.
- Using the Tools menu, select Board and make sure the type of board you are using (Arduino Uno or Arduino Yún) is selected.
- Using the Tools menu, select Port and make sure your board is selected on a COM port.
- Using the File menu, select Examples > Firmata > StandardFirmata. This will open a new Arduino IDE window with the code for the Standard Firmata loaded.
- Using the Sketch menu, select Upload. This will upload the firmware to your Arduino (you should see the lights on the Arduino blink while this happens).
- Close all Arduino IDE windows.
Conclusion & Next Steps
That’s it for now. You are ready to start the workshop.