Arduino hardware bridges the gap between pure electronics projects and more advanced single-board computers like the Raspberry Pi. This makes boards like the Arduino Uno especially well-suited to IoT projects. Wire up the board, write the logic, and you have the perfect “guts” for your DIY IoT creations.
The easiest way to write code and upload it to the Arduino hardware is to use the Arduino IDE. Getting up and running with the IDE isn’t especially difficult, but it might be daunting if you’re doing so for the first time. Don’t worry, as you’ll be running code on your Arduino in just a few minutes.
Before You Start
This article only explains how to install the Arduino IDE on macOS. That said, don’t worry if you’re wondering how to install it on other operating systems. If you are, take a look at our guides to installing the Arduino IDE on Ubuntu or installing it on Windows.
This also isn’t a tutorial on coding for the Arduino. That is too deep of a subject to touch on here, but fortunately, you’ll find plenty of tutorials elsewhere online. What we will explain here is how to get code uploaded to the Arduino.
To follow this tutorial, you’ll need Arduino hardware like the Arduino Uno. You’ll also need a USB cable to power the Arduino and to upload code from your computer. You’ll need a Mac running OS X Mountain Lion or newer in order to run the installer.
Download and Install the Arduino IDE
To get started, head to the Arduino IDE download page and grab the installer for macOS. If the file is a zip file, right-click on it and extract it.
Once the file is downloaded and extracted, drag it into your Applications folder. That’s it for the installation.
Install Third-Party Drivers (If You Need Them)
If you’re running certain Arduino boards, you may need additional drivers. This isn’t too likely, though, as recent boards like the Arduino Uno don’t need these drivers.
If you know you need these drivers, or you encounter an error trying to run the Arduino IDE, installing them isn’t tricky. The driver you need is for a chip supplied by FTDI. Head to the FTDI download page, and download the appropriate drivers for your system. Once downloaded, run the installer and follow the prompts.
Running the IDE
To run the Arduino IDE, either double-click it in the Applications directory or press Command + Space, then type Arduino to run it. Once the app launches, you’ll see the main editor screen. You could just start coding immediately, but you should make sure you can upload code to your board first.
One of the easiest ways to test this functionality is with an example project called Blink. Open the File menu, then scroll down to Examples, then “01. Basics.” Here, select Blink.
Select your board type under the “Tools -> Board” menu, then select the serial port that your board is connected to under “Tools -> Port. If you’re not sure which port is the Arduino, note the ports listed, then unplug your board and look at the ports again. The port that disappeared when you unplugged the board is the one you should choose.
Make sure your board is plugged in. Press the Upload button (with the arrow icon). In a few seconds you should see lights on the Arduino flash, indicating that everything works properly.
Conclusion
Now that you know the basics, it’s time to start working on projects of your own. If you’re new to Arduino projects or coding in general, don’t bite off more than you can chew. Start with smaller projects, then work your way up to bigger ones.
If you’re not sure where to start, you can always look to other projects for inspiration. If these don’t spur your own ideas, you can build on them to make something even better. For an idea of where to start, take a look at our roundup of our favorite IoT projects using Arduino.
Get the best of IoT Tech Trends delivered right to your inbox!