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:

  1. Pick three random numbers between 0 and 180 using this website
  2. Make the servo move to these three positions every second repeating forever.

3.6_Video

Step Three: Debug and Submit

Make sure your prototype behaves correctly and submit the code here titled 4.3_Servo.ino

GitHub

View Github