Deliverables and Homework: Homework 7
Use the IR remote to control the servo.
Goal: Understand how to use the IR remote control and the servo.
Set-up: Connect the IR receiver and the servo to the Arduino. If you want to be awesome: Connect the LCD display, too, and show what commands are being received.
Programming: Program the Arduino that it responds to selective buttons pressed on the IR remote. Write code that drives the servo all the way to the left when "1" is pressed, all the way to the right when "3" is pressed and to the center of its motion range when "2" is pressed. Furthermore, use the "+" and "-" buttons to drive the servo in single degrees to the right or to the left, enabling full control of the servo arm position via the remote. You can also use a different remote, like a TV remote. If you want to do that you will need to read out the codes for each button and then use those codes in your sketch.
Servo: Watch our servo video posted here. It explains how it works, how to use it and an example sketch is also provided.
IR Remote: Watch our video about the IR remote. It discusses how to connect the IR receiver and how to read out the commands it receives. It also explains how to use a 'case' structure to respond to the various remote buttons.
To get credit: Come to class on the due date and present your working set-up to one of the TAs or Instructors.