Arduino Workshop - Project 03: Servo Motor Sweep


Hardware Required:

  • Arduino Uno board
  • Servo motor
  • jumper wires

    Hardware Required

Schematic:



Project Steps:

Prepare the Arduino with the code (because pin D9 was in use by the LED in project 2):

  1. Connect the Arduino unit to your computer with the USB cable
  2. Open the Project3 sketch into the Arduino software and upload it to your module
  3. Disconnect the USB cable

Connect wires directly between the Arduino and the Servo Motor:

  1. Connect a wire between the ground and black servo wire (brown on some motors)
  2. Connect a wire between the +5V and the red servo wire
  3. Connect a wire between D9 and the white servo wire (yellow on some motors)
  4. Connect the USB cable to the Arduino to provide power to the servo and run your code.

Things to try:

  • Change the delay while positioning the motor. What happens if the delay is too short?
  • Change the maximum angle the motor can turn to 90 degrees.
  • Change the maximum angle the motor can turn to 360 degrees.

  • Note: some servo motors can only move 180 degrees or less!

Technical Support Community

Free technical support is available for your desktops, laptops, printers, software usage and more, via our new community forum, where our tech support staff, or the Micro Center Community will be happy to answer your questions online.

Forums

Ask questions and get answers from our technical support team or our community.
PC Builds
Help in Choosing Parts
Troubleshooting

Knowledge Base

Helpful articles written by Micro Center Experts.
ESET
Windows

Sign in for the best experience

Access helpful features and personalize your experience - Sign in or create an account now

Sign In
Don't have an account? Create Account