Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.06 KB

File metadata and controls

50 lines (37 loc) · 1.06 KB

Make a remote control robot arm

Use a rotary potentiometer (pot) to control the position of a servo.

  • Attach a potentiometer to pin A2
  • Attach a servo to pin 9
  • Have the servo rotate as the potentiometer is turned

Circuit diagram

         Servo
         .---.
         | | |
       -===+===-
         | | |
         |   |
         '---'
         | | |
         | | |
         | | ------------------o  Pin 9
         | |
         | ----------------.---o  +5
         |                 |
         |  Potentiometer  |
GND  o---.------/\/\/------.
                   ^
                   |
                   |
 A2  o--------------

Components

Produces a variable resistance dependant on the angular position of the shaft.

Docs

Hints

  • A potentiometer is another use case for the Sensor object...
  • A pot produces input values between 0 and 1023.
  • A servo can typically be moved between 0 and 179 degrees.