Lab Report Week 10

Objective: Add a sensor in the form of a knob  (a.k.a. potentiometer) to our servo motor (actuator) so that it can do more stuff.

Materials:

Servomotor

Servo Library (knob code)

Jumper Cables

Potentiometer

USB cable

Arduino Uno

Breadboard

Procedure: For starters we hooked everything up as follows

  • Connect Arduino to computer for power using USB (and to access code)
  • Connect servo to board using jumper – yellow to pin 9, red to power, and black to ground.
  • Connect potentiometer to – bread board yellow goes to A0, red to power, black to ground
  • We use stranded wire because it is more bendable and resilient
  • We connected power and ground from bread board to Arduino
  • We downloaded the code from the Arduino library
  • knob_schem
  • This was successful – we were able to control the servo with the potentiometer
  • We tried to reverse the direction of the shaft by reversing the code arguments in the function line of codecode change
  • This was successful
  • IMG_3088
  • We then reversed the direction by swapping the power and the ground wires of the potentiometer
  • This was successful

Result:  All of our attempts were successful. We were able to integrate all of the components and change both the hardware and the code.  The Arduino continues to prove itself to be durable and easy to use making it an ideal tool for homemade custom projects.

 

 

 

 

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply