Node.js - Connected Weather Station
Setting Up Your Arduino
Table of Contents
- Table of Contents
- Install the Arduino IDE
- Upload the Standard Firmata to your Arduino
- Connecting the Weather Shield
- Conclusion & Next Steps
If you haven’t already done so, please follow the instructions in ‘Getting Started’ section.
In this lab you will install the Standard Firmata onto your Arduino (or SparkFun RedBoard…which we include when we refer to the Arduino Uno). The Standard Firmata exposes basic input/output on the device for your gateway application to access.
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 Firmata 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/Genuino Uno) 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.
Connecting the Weather Shield
The weather shield comes equipped with two onboard sensors - a HTU21D humidity sensor capable of gathering both humidity and temperature, and a MPL3115A2 barometric pressure sensor. There are connections for other optional sensors, such as wind, rain and soil moisture sensors (we will not be working with the optional sensors in this lab series). Simply plug the Weather Shield into the Arduino (the pins only match one way).
Conclusion & Next Steps
You have configured your prototyping device for use in this workshop. Now you can proceed to the next lab.