Arduino 4.3 – Servo Control
The SG90 Servo is a simple three-wire servo that is simple to use. For this assignment you will need to review how to add a library to the Codebender app.
Step One: Build the Circuit
Build your circuit according to this schematic:
Step Two: Write the Code
Be sure you have used the “Servo” library that comes with the Arduino Web Editor we use in class. After testing it out, revise the code to do the following:
- Pick three random numbers between 0 and 180 using this website
- Make the servo move to these three positions every second repeating forever.
Step Three: Debug and Submit
Make sure your prototype behaves correctly and submit the code here titled 4.3_Servo.ino