Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test Code for TowerPro SG 5010
// coded by Dr. Abhishek Ghosh @AbhishekCTRL
// under GNU GPL 3.0
// https://thecustomizewindows.com/
// Written for testing TowerPro SG 5010 with Arduino UNO powered from USB
// yellow -> pin 9, brown -> ground/GND, red -> 5v,
#include <Servo.h>
Servo towerprosg5010;
int pos = 0;
void setup()
{
towerprosg5010.attach(9);
}
void loop()
{
for(pos = 0; pos < 180; pos += 1) // 0 to 180 degrees with 1 degree step
{
towerprosg5010.write(pos);
delay(120); // time set 120 ms to reach sloooooowly
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.