Arduino 01: Installing the Arduino Application and Firmware Jeffrey A. Meunier jeffm@engr.uconn.edu University of Connecticut
About: How to use this document I designed these tutorial slides to be tall and narrow so that you can display them on one side of your screen while you do other work in the rest of the display area like this: Tutorial work area Also, the pages in this tutorial are designed to be viewed as whole-page slides. I describe how to do that next. 2
Set your PDF viewer to single page mode (Mac) On a Mac, a PDF file will open in the Preview application by default. Hide the side bar and set it to Single Page. 3
Set your PDF viewer to single page mode (Windows) In Windows, a PDF file will open in the Reader application by default. You can open the menu from the icon in the upper left corner of the window and then choose Split Left or Split Right depending on your preference. Then right-click on the document and choose the One page viewing option. 4
Introduction In this tutorial you'll install the Arduino application on your computer and use it to install a firmware file on your Arduino board. This firmware will be used for all the Arduino projects this semester. 5
Objectives The objectives of this tutorial are: Installation of the Arduino application. Uploading firmware to the Arduino board. Testing the firmware to ensure that it uploaded correctly and that it's running correctly. 6
Prerequisites You must have administrator privileges on your computer in order to install software. If you're working in one of the UConn Learning Center labs then you should skip ahead to section 2. Arduino firmware installation of this tutorial. The Learning Center computers all have the Arduino application installed already. 7
Outline These are the sections you'll go through in this tutorial: 1. Install the Arduino IDE 2. Upload firmware to the Arduino 3. Test the firmware 8
1. Arduino IDE application: About The Arduino application runs on your host computer and you use it to compile and upload programs directly to the Arduino. After you install the Arduino application, you'll use it to install firmware onto your Arduino board. You need to do this only one time. After you unplug the Arduino board from your computer it will still retain the program that you upload to it. When you plug it back into your computer the program will start running again. 9
1. Arduino IDE application: Identify your operating system On the next few slides I detail the installation procedure for different computer systems. Follow the instructions for your computer: Windows Mac Linux 10
1. Arduino IDE application: Download (Windows) Go to this web site: https://www.arduino.cc/en/main/software Scroll down to the Download the Arduino IDE section and click Windows App if you have Windows 10 only. It does not work on Windows 8 despite what it says. Otherwise choose Windows Installer. It asks for a donation, but locate the JUST DOWNLOAD link and click it. Save the file somewhere convenient on your computer. 11
1. Arduino IDE application: Install (Windows) After it finishes downloading you must install the application. Double-click on it to run the installer and follow the directions it gives you. Windows 10: I didn't try this in Windows 10, so I don't know if you must do the installation step or not. The download process might also be the installation process. 12
1. Arduino IDE application: Download (Mac) Go to this web site: https://www.arduino.cc/en/main/software Scroll down to the Download the Arduino IDE section and click Max OS X. It asks for a donation, but locate the JUST DOWNLOAD link and click it. Save the file somewhere convenient on your computer. 13
1. Arduino IDE application: Install (Mac) After it finishes downloading you must install the application. Double-click on the zip file that you downloaded, then move the resulting Arduino.app file into your Applications folder. 14
1. Arduino IDE application: Installation (Linux) Go to this web site: https://www.arduino.cc/en/main/software Scroll down to the Download the Arduino IDE section and click Linux. After it finishes downloading you must install the application. Uncompress the downloaded file, move the folder somewhere convenient, and add the folder's bin folder to your path. Good luck, I didn't try it. You could probably just do an apt install arduino to automate the whole installation process. 15
Outline 1. Install the Arduino IDE 2. Upload firmware to the Arduino 3. Test the firmware 16
2. Arduino firmware: Download the firmware All users continue here! Go to this web site: http://www.engr.uconn.edu/~jeffm/arduino/f irmware/index.html Right-click on the link for ArduinoFirmware-2016.11.07a.ino and choose Save as or Save link as. Save it in Downloads or on your Desktop. It doesn't matter where, just remember where you put it. 17
2. Arduino firmware Check the file extension Be sure that the firmware file that you just downloaded has the extension.ino and not.txt. If it has the extension.txt, you must rename it to delete the.txt part leaving just the.ino part. 18
2. Arduino firmware Don't store it in OneDrive Windows users: The Arduino application is unable to upload a.ino file to the Arduino if that file is contained in OneDrive. Save the file somewhere else before opening it in the Arduino application, like on your desktop. 19
2. Arduino firmware: Open the firmware file Start the Arduino application. Choose the menu File Open and locate the Arduino firmware file you just downloaded and saved. When you open the file it will show you this warning: Click OK to let it create the folder and move the file. 20
2. Arduino firmware: Identify your board Red board If your board looks like this then you have a RoboRED board. 21
2. Arduino firmware: Identify your board Blue board If your board looks like this then you have a Robo-1 board. 22
2. Arduino firmware: Identify your board Other If you have a board other than one of these two, then it's your responsibility to be able to identify it correctly in the Arduino application. 23
2. Arduino firmware: Choose the board All users continue here! In the Arduino application, choose the Tools Board menu and choose your board type from the list. RoboRED users choose Arduino/Genuino Uno. Robo-1 users choose Arduino Duemilanove or Diecimilia. Red Blue 24
2. Arduino firmware: Choose the port (Mac) In the Arduino application, choose the Tools Port menu and choose the name of your USB port from the list. On a Mac the port will be called /dev/cu.usbmodem1411 or /dev/tty.usbmodem1411 or something very similar (the number at the end may be different). It may not say "(Arduino/Genuino Uno)" after it. Still choose that option. 25
2. Arduino firmware: Choose the port (Win) In the Arduino application, choose the Tools Port menu and choose the name of your USB port from the list. If there's more than one name and you're not sure which one it is, then un-plug the Arduino, choose Tools Serial Port to see what ports are there, plug the Arduino back in and choose Tools Serial Port again to see which port is listed that wasn't there before. That's the port you should use. Remember this port name for later! 26
2. Arduino firmware: Choose the port (Linux) Unplug the board, do an ls /dev to see what ports are there, plug in the board, do an ls /dev again and observe what port is new. That's your port. It's probably /dev/arduino or /dev/ttyacm0. I'll try to provide more details whenever I get around to doing this again in Linux. 27
2. Arduino firmware: Upload the firmware file All users continue here! Press the Upload button in the Arduino application to compile & upload the program to the Arduino board. The red arrow below points at the Upload button. 28
2. Arduino firmware: Observe the status Success Failure See the next slide for suggestions 29
2. Arduino firmware: If you had a failure Some things for you to check: Is the board actually plugged into your computer? Did you choose the right board in the Arduino application? Most likely Did you choose the right serial port? Is your USB cable faulty? Swap cables with someone and check it. Is your Arduino faulty? Swap boards with someone and check it. Not likely Fix it and try again. 30
2. Arduino firmware: If you had a failure If you had a failure and you were not able to correct it, you must get help to correct the problem before you proceed. If you do not correct the problem then the rest of this tutorial will not work. 31
Outline 1. Install the Arduino IDE 2. Upload firmware to the Arduino 3. Test the firmware 32
3. Test the firmware: Serial monitor settings Now we'll test the firmware. Open Tools Serial Monitor. Find the settings at the bottom of the Serial Monitor window. Settings On the next slide you'll change the settings. 33
3. Test the firmware: Serial monitor settings The settings originally look like this: Incorrect Change them to look like this: Correct 34
3. Test the firmware: Enter commands Type this in the top area of the Serial Monitor and press Enter: That sets the mode of digital pin 13 to output. Then enter these two commands in the same place in the Serial Monitor: dw13,1 LED turns on dw13,0 LED turns off The on-board LED should turn on and off. 35
3. Test the firmware: Didn't work? You didn't do this right: The settings originally look like this: Incorrect Change them to look like this: Correct 36
3. Test the firmware: Upload complete The firmware has been successfully uploaded to the Arduino board. Close the Arduino application. The next time you plug in your Arduino board it will start running the firmware automatically. You do not need to upload the firmware to it again. 37
Outline 1. Install the Arduino IDE 2. Upload firmware to the Arduino 3. Test the firmware You're done! 38