sunday code for project. needs slight revision.
Dependencies: Motor Servo22oct mbed
Revision 5:a7c0a09a7c58, committed 2014-10-23
- Comitter:
- alphasig
- Date:
- Thu Oct 23 17:49:36 2014 +0000
- Parent:
- 4:4b093f9bd41c
- Commit message:
- project day changes, upped motspeed
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4b093f9bd41c -r a7c0a09a7c58 main.cpp --- a/main.cpp Wed Oct 22 20:43:07 2014 +0000 +++ b/main.cpp Thu Oct 23 17:49:36 2014 +0000 @@ -1,12 +1,10 @@ +//Project X +// Jordan Kangwijaya, Gabe Collins, Kyle Schaff + #include "mbed.h" #include "Servo.h" #include "Motor.h" -//DigitalIn Switch1(p16); -//DigitalIn Switch2(p17); -//DigitalIn Switch3(p18); -//DigitalIn Switch4(p19); - BusIn Switch(p16,p17,p18,p19); BusOut LED(p5,p6,p7,p8,p11); @@ -14,17 +12,11 @@ Servo servo1(p21); //top .39 to 1.02 Servo servo2(p22); //bottom .38 to .93 - float servopos; -float motorspeed=.3; +float motorspeed=.35; int counter=0; int counter1=0; -//float sw1=Switch1; -//float sw2=Switch2; -//float sw3=Switch3; -//float sw4=Switch4; - int main() { while(1) { @@ -111,7 +103,7 @@ } while(Switch==8) { - motorspeed=.31; + motorspeed=.35; m.speed(motorspeed); for(servopos=.40; servopos<=.60; servopos+=.03) { servo1=servopos+.2;