Presentation is loading. Please wait.

Presentation is loading. Please wait.

SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. SERVOS Precise rotations.

Similar presentations


Presentation on theme: "SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. SERVOS Precise rotations."— Presentation transcript:

1 SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP

2 SERVOS Precise rotations.

3 SERVOS: WHAT ARE THEY GOOD FOR? Rotating a precise amount Rotating with more power (torque) than a DC motor. Lots of different attachments.

4 LIMITATIONS Can’t make a full rotation; can only rotate about 180 degrees. Even at rest, servos use energy. They can consume a lot of current and overload an Arduino.

5 EXAMPLES Two servos for each leg; one for each axis of rotation.

6 EXAMPLES Rotational motion can be translated into linear motion.

7 EXAMPLES Servos can take a lot of current, but this Arduino is able to power two small servos.

8 HOW IT WORKS

9 THREE WIRES? RED = 5 Volts BLACK = Ground WHITE = Control from the Arduino

10 PROGRAMING THE ARDUINO Important steps: Tell your program to include pre-written functions for servos: #include Define a variable that is of the “Servo” type (in this example the name is “myservo”) Servo myservo; “Attach” the servo to a pin (similar to the “pinMode” function). In this example, the servo is connected to pin 9. This is where the third wire on the servo goes. myservo.attach(9); Write the servo to a position between 0 and 180 degrees (in this example “pos” can be any number between 0 and 180). myservo.write(pos);

11 EXAMPLE CODE:


Download ppt "SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. SERVOS Precise rotations."

Similar presentations


Ads by Google