Skip to content

Part 2. Installing the Arduino IDE and Libraries

Rachel edited this page Sep 20, 2017 · 4 revisions

If you've never done anything with Arduino before, it is very different than working with the Pi because with the Pi we had access to an entire operating system. With Arduino, we upload one program to it and it’s only job is to run that one program. The language we use to program Arduino is also different than the Pi - On the Pi we were running Python scripts; the Arduino runs “sketches”, which are based on the language C. You can read more about Arduino Sketches here: https://www.arduino.cc/en/Tutorial/Sketch

Communicating with your Arduino is mostly done through the Arduino IDE and the USB-to-Micro-USB cable. This is how we upload sketches to the board that execute every time the board is powered on. Once a sketch is uploaded, you can unplug the Arduino and plug it into another power source to automatically start running the last uploaded sketch.

Step 1: Download and Install the IDE

screen shot 2015-10-22 at 12 59 25 pm

Visit the Arduino Software page and find your computer type in the list to the right of the current version of the IDE that is available. Download the zip file and unzip it to install.

Double click on the Arduino IDE icon to get started!

Step 2: Install the DHT library (Optional)

If you're following along with the Temperature/humidity sensor listed under "Equipment", then you'll want to install this library to make reading from it much easier.

This library is called "DHT-Sensor-Library". Go here and download the zip by clicking the button in the bottom of the right column. Then go back to the IDE and select Sketch -> Include Library -> Add .ZIP Library....

arduinoideaddlibrary

Select the zip file you just downloaded and then click "Choose". All done!

Step 3: Plug in the Cactus Micro

The Arduino can be both powered and programmed from its microUSB port. The USB cable you plug between it and your computer is also referred to as a “Serial” cable, so when you connect your Arduino to your computer it is called a “Serial” connection.

Connect the Cactus Micro to your computer's USB port and open the Arduino IDE we just installed. Select Tools -> Board: -> LilyPad Arduino USB (the Cactus Micro is functionally the same as the LilyPad).

Also under Tools, select Port and choose the “/dev/tty.usbmodem****" that has “LilyPad USB” after it.

Note: If you don’t see a /tty.usbmodem**** port, your USB cable might not be the correct type. Surprisingly, some USB cables are not capable of serial communication and can only provide power. Try using a different cable.

Here's a picture of the sketch window with labels in case you're not sure what I'm talking about in the next section:

arduino ide

<< Part 2: Setting up the Cactus Micro - Part 2: Reading from a Sensor >>

Clone this wiki locally