Engineering 100-950
Tutorials
Walk-throughs on common issues or installations.
Contents
Arduino IDE Install
Windows
- Download the latest release
- Follow the instructions in the installation guide.
- When completing the setup, leave Run Arduino IDE ticked to launch the application, or launch it later from the Start Menu.
macOS
- Download the latest release
- Double-click the disk image (.dmg) file.
- Drag and drop the Arduino IDE application into the Applications folder.
- Launch Arduino IDE the same way you would launch any other application (such as Command + Space for Spotlight and search for “Arduino”).
Linux
-
Find the AppImage file in your file manager.
-
Make the AppImage file executable:
- Right-click the file.
- Choose Properties,
- Select the Permissions.
- Tick the Allow executing file as program box.
-
Double-click the AppImage file to launch Arduino IDE.
If Arduino IDE fails to open, and you see the text dlopen(): error loading libfuse.so.2
or AppImages require FUSE to run
, you may be missing some dependencies. Follow these steps:
-
Open the Terminal application.
-
Enter this command:
sudo apt-get -y install libfuse2
-
Press
Enter
and wait for the process to complete. -
Close the Terminal window.
-
Try launching Arduino IDE again by double-clicking the AppImage file.
Chromebook
See this guide.
Note: We as instructional staff have not tested all of the Arduino labs on a Chromebook, so some features may not work as intended.
Arduino Library
After running the Arduino IDE, either click the library manager on the left (looks like some books), or press Ctrl+Shift+I.
In the bar that says “Filter your search…” type “ENGR100-950” and press Enter.
Click on the “Install” button on the library. If no errors pop-up, you are good to go!
Arduino IDE Usage
Using the Starter Code
For the majority of projects in our class, we will give you sample starter code for each lab. These are packaged in the library you downloaded in the step above. If you have not yet installed this library, do so now!
To access this starter code within the Arduino IDE, go to File>Examples>ENGR 100-950, and click on the desired starter code.
Saving Code
Whenever you modify anything in this code, you will need to specify where you want it to save on your computer. Arduino IDE does NOT auto-save your code!
To save, press Ctrl + s (or Command + s for Mac), pick a location, and name it something. It is recommended you make a folder somewhere accessible on your computer for you to save all of your code onto for this class. This will make it easier to find to reference or submit later.
To open your projects again, go to File>Open, or double click on the .ino
file right from your file manager, which should open it in the Arduino IDE.
Connecting to an Arduino
To start, we need to tell the Arduino IDE which type of Arduino we are using (in our case, an Arduino Nano), and which port it is located at.
To do this, either select the “Select Board” dropdown
and choose the Arduino Nano and whatever port shows up when it is plugged into your computer like so:
.
Alternatively, you can open Tools>Board and specify the board and port quickly from there. This looks like this:
From this dropdown you can choose the Arduino Nano and specify which port you would like to connect on.
When you plug in Arduino, it should show up in the list of options for the port regardless of which way you specify the port. If it is not showing up, before asking for help, try:
- Unplugging and re-plugging the Arduino / USB cables
- Force quitting the Arduino IDE (after saving your work!) and relaunching it
- Unplugging all of the wires connecting to pins on your Arduino. If there are shorts or if things are wired incorrectly or on the wrong pins, it can cause your Arduino not to show up.
Once the Arduino port shows up, select it.
Uploading Code
When you have an Arduino plugged in and ready to go, you will need to verify and upload your code. With no Arduino plugged in, you can test that your code will compile either by pressing the check-mark in the top left of the IDE, or by pressing Ctrl + R. If this runs successfully you know you are ready to upload to an Arduino!
When your Arduino is plugged in, you don’t need to compile/verify, the upload button will do that for you. Simply press the right arrow or Ctrl + U and watch the progress.
If your code is failing to upload to your Arduino, try the troubleshooting steps listed above, as well as trying to press and hold the reset button on the Arduino for a period of time and continue holding it while plugging it into the computer. Sometimes this can help an Arduino that is stuck executing code forever to take a break to accept your new code.
Additionally, if uploading is failing, try changing to a different bootloader. This is under tools, and you can try switching between the old and new bootloaders.
Viewing Arduino Output
Arduinos have 2 main ways of interfacing and displaying data on your computer. These are through the Serial Monitor, and the Serial Plotter. Both are accessible via the buttons in the top right-hand corner of the Arduino IDE.
Both of these connections only work when an Arduino is plugged in and the port is specified correctly. Additionally, you will need to confirm that the baud rate - the speed at which the Arduino and your computer agree to exchange data at - is set the same for both your computer and your Arduino. This is configurable from Serial Monitor in the top right hand corner of the console in the bottom of your screen. The default for most instances is 9600 baud.