Gets user Input to turn the servo to certain degrees
Diff: servo.cpp
- Revision:
- 3:5b6a55afc60a
- Parent:
- 2:9d9717796ab2
- Child:
- 6:27284b61ae0c
diff -r 9d9717796ab2 -r 5b6a55afc60a servo.cpp --- a/servo.cpp Sun Jan 13 21:57:11 2019 +0000 +++ b/servo.cpp Sun Jan 13 22:04:47 2019 +0000 @@ -21,6 +21,8 @@ case 9: servo.pulsdewidth_us(pulsewidth(-90)); break; } - - - } \ No newline at end of file + } + +int pulsewidth(int a){ + return 1500 + 10*a; +} \ No newline at end of file