Temperature Controlled Servo

If you and your group have any questions or get stuck as you work through this in-class exercise, please ask the instructor for assistance. Have fun!

REQUIRED CODE

  1. If you haven’t already, please go to the Arduino website and download the “Arduino IDE” for either Windows or Mac, and then install the software on your computer.

    Materials needed: temperature sensor servo

    • 1 Servo
    • 1 Temperature Sensor (TMP)
    • 4 Short Wires of any colour
    • 2 Long Wires of any colour
    • 1 Long Black Jumper Wire
    • 1 Long Red Jumper Wire
    • 1 Short Yellow Wire
    • 3 Short Purple Wires
  2. Connect the circuit as shown in the diagram below:

    breadboard

    Using the USB cable, plug your Arduino into your computer.

  3. This project requires code which is not provided by the Arduino software. Follow the link below and copy the contents of the page into a new script on the Arduino IDE:

    https://goo.gl/uZdaVm

  4. To create a new script on the Arduino IDE, select File -> New and save it with the name and location of your choice.

    menu navigation

  5. After creating a new script, replace the content in the window with the code you have copied from the link in step 4.

  6. When ready, click the Upload button (the right arrow in the top left corner).

    upload

  7. Hold the TMP sensor and watch the servo spin with the warmth of your touch!

NEXT PROJECT: Lucky 8-Ball