Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of 4LegUpDown_8sense by
Diff: main.cpp
- Revision:
- 7:583ad8798bf1
- Parent:
- 6:6664c6aa67d3
- Child:
- 8:36a85b66796f
diff -r 6664c6aa67d3 -r 583ad8798bf1 main.cpp
--- a/main.cpp Thu Sep 11 22:00:53 2014 +0000
+++ b/main.cpp Fri Sep 12 00:42:47 2014 +0000
@@ -19,7 +19,6 @@
Timeout StopTimer[8];
Timeout StopTempra;
-//Timeout StopTempra;
volatile bool MotorState[4] = {0},Flag[4] = {0},FlagAdd[4] = {0},And[4] = {0};
@@ -32,7 +31,7 @@
*/
/*
-bMotor = {
+Motor = {
LeftFrontUp, LeftFrontDown,
RightFrontUp, RightFrontDown,
LeftBackUp, LeftBackDown,
@@ -347,7 +346,7 @@
StopTimer[7].attach(&MotorStop7,MOVE_DOWN_TIME);
Motor = Motor | 0x01;//00000001
}
- for(i = 0; i > 4; i++){
+ for(i = 0; i < 4; i++){
Led[i] = 0;
Flag[i] = 0;
FlagAdd[i] = 0;
@@ -379,7 +378,7 @@
Pwm[1] = PWM_LEVEL ;
Pwm[2] = PWM_LEVEL ;
Pwm[3] = PWM_LEVEL ;
- //for(i = 0 ; i > MOTOR_NUM ; i++ ){
+ //for(i = 0 ; i < MOTOR_NUM ; i++ ){
Photo[0].mode(PullUp);
Photo[1].mode(PullUp);
Photo[2].mode(PullUp);
@@ -399,8 +398,8 @@
Photo[6].fall(FallPhoto6);
Photo[7].fall(FallPhoto7);
- // Sw.mode(PullUp);
- // Sw.fall(Reset);
+ Sw.mode(PullUp);
+ Sw.fall(Reset);
}
