Encoder and servo
Let's move a servomotor
What are we going to do?
In this activity you'll learn how to control a servomotor with an encoder. A rotary encoder, also called a shaft encoder, is an electro-mechanical device that converts the angular position or motion of a shaft or axle to an analog or digital signal.
Let's get started
Follow these instructions carefully. You can click on some of the images to zoom in.
Always connect the components BEFORE powering the UNO board or YOU MAY DAMAGE YOUR BOARD OR COMPONENTS.
Now, what else?
Now is your turn:
- What would you change on the code to make it quicker or more accurate?
- And, if you want to limit the angle rotation to 90 degrees?