2.00b Toy Product Design

Thermometer Step-by-Step

Set up computer for programming

We will be using an Arduino Integrated Development Environment (IDE). An IDE is a program made for editing code files. Although code files are text files and could be edited in a text-editing program, an IDE usually includes many features that help make programming easier. The Arduino IDE not only lets us write and edit programs for the Arduino microcontrollers, it also helps us to upload the programs to the Arduino microcontrollers.

There are two versions of the Arduino IDE: a web-based Arduino Web Editor and a desktop version of the Arduino IDE for Windows or Mac OS. For this project, either should work, and when we refer to the "IDE", we mean either program. However, we strongly recommend that you use the desktop version instead of the web version, since the board driver management is all contained within the desktop software. If you choose to use the web-based version, you will also need to use a separate plugin to manage the connection between the microcontroller and your computer. The plugin is sometimes a bit flaky (leading to long periods of wondering what is going on). We will be supporting the desktop version in this class (i.e., that is what the staff will be most familiar with, and the screenshots in these instructions will be from the desktop version).

Go install the Windows or Mac OS version of the Arduino IDE.

Windows IDE Installation

To install the Windows version of the Arduino IDE:

  • Go to the Arduino software downloads page.
  • Click on the "Windows Win 7 and newer" option.
  • On the subsequent page, click the "Just Download" button (or contribute, if you wish) and the installer will start to download onto your computer.
  • Once the download is finished, "Open" the installer.
  • The installer will start. Agree to everything. There may be a number of popups asking for various permissions.

Once the installer is complete, there will be a shortcut to the Arduino IDE on your desktop, or a square in the Windows 10 interface. Watch the video below for a demonstration of the steps above. (Caveat: events in the video take longer than shown!)

Mac OS Installation

To install the Mac OS version of the Arduino IDE:

  • Go to the Arduino software downloads page.
  • Click on the "Mac OS X 10.10 or newer" option.
  • On the subsequent page, click the "Just Download" button (or contribute, if you wish) and the installation zip file will start to download onto your computer.
  • Once the download is finished, "Open" the installation zip file. The zip file will uncompress and Finder will open with the contents of the zip file.
  • Drag the Arduino application to the Applications folder.
  • (Optional) Drag the Arduino application to your Dock.

Watch the video below for a demonstration of the steps above. (Caveat: events in the video take longer than shown!)

Install Libraries

Out of the box, our microcontroller understands how to do basic things, like computation. We can provide it with more functionality by using libraries. Libraries are programs that people have written that tell the microcontroller how to do certain things. In this case, we will be installing libraries that will tell our microcontroller how to communicate and work with the IR temperature sensor and display, and also how to interface with its onboard WiFi chip. This is similar to installing drivers for peripherals on a computer.

To install a library:

  • Start the Arduino IDE. This will open up a File Editor, which we will ignore for now.
  • Start the Arduino Library Manager from the menu bar.
    Tools --> Manage Libraries...
    The library manager will start up.
  • Type the library search term in the search box. The library manager will filter the libraries and show the ones that match the search term.
  • Find the library that matches the name of the library you want to install. Many library names are very similar, so check carefully!
  • Click on the Install button to install the library. If the library depends on other libraries, a pop-up message will ask whether you want to install only that library or its dependencies as well. Click Install all in that situation. If there is no Install button, then the library is already installed and should indicate that.

Watch the video below for a demonstration of the steps above. The Windows and Mac Arduino IDE work exactly the same.

Please search for and install the following libraries (and their dependencies!):

search termlibrary namepurpose
mlx90614Adafruit MLX90614 LibraryIR temperature sensor support
gfxAdafruit GFX Librarydisplay support
st7735Adafruit ST7735 and ST7789 Librarydisplay support
spiflashAdafruit SPIFlashdisplay sd card support
imagereaderAdafruit ImageReader Librarydisplay sd card support
wifininaWiFiNINAwifi support

Most libraries include example code that you can use to learn how to use the library. The example code shows up in the IDE only after a restart. Please quit the IDE.

If you accidentally install the wrong library. You may leave it, or you may uninstall it. There is no harm in leaving it installed. To delete a library, find the libraries folder in your Arduino installation. In this folder, there is a folder for each library that is installed. Find the folder that has the same name as the library you wish to remove, and delete the folder.