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!
-
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:
- 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
-
Connect the circuit as shown in the diagram below:
Using the USB cable, plug your Arduino into your computer.
-
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:
-
To create a new script on the Arduino IDE, select File -> New and save it with the name and location of your choice.
-
After creating a new script, replace the content in the window with the code you have copied from the link in step 4.
-
When ready, click the Upload button (the right arrow in the top left corner).
-
Hold the TMP sensor and watch the servo spin with the warmth of your touch!