![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
this isn't working the servo just twitches
Dependencies: Servo mbed Motor
main.cpp@0:22157cad3c1e, 2014-10-05 (annotated)
- Committer:
- Ty
- Date:
- Sun Oct 05 17:05:46 2014 +0000
- Revision:
- 0:22157cad3c1e
- Child:
- 1:7fa77283f89e
launch servo code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ty | 0:22157cad3c1e | 1 | #include "mbed.h" |
Ty | 0:22157cad3c1e | 2 | #include "Servo.h" |
Ty | 0:22157cad3c1e | 3 | |
Ty | 0:22157cad3c1e | 4 | Servo launchservo(p21); |
Ty | 0:22157cad3c1e | 5 | DigitalIn sw3(p18); |
Ty | 0:22157cad3c1e | 6 | int launchswitch; |
Ty | 0:22157cad3c1e | 7 | int main() { |
Ty | 0:22157cad3c1e | 8 | |
Ty | 0:22157cad3c1e | 9 | while(1){ |
Ty | 0:22157cad3c1e | 10 | launchservo=0; |
Ty | 0:22157cad3c1e | 11 | launchswitch=sw3.read(); |
Ty | 0:22157cad3c1e | 12 | }//hey guys when I'm testing this code the servo just twitches it doesn't rotate I don't know whats up |
Ty | 0:22157cad3c1e | 13 | |
Ty | 0:22157cad3c1e | 14 | |
Ty | 0:22157cad3c1e | 15 | } |
Ty | 0:22157cad3c1e | 16 |