![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
vf
Dependencies: Servo ServoArm mbed
Fork of PES_Official by
Diff: Sources/main.cpp
- Revision:
- 7:6fed0dcae9c1
- Parent:
- 6:ba26dd3251b3
- Child:
- 10:f76476943a6c
--- a/Sources/main.cpp Wed Apr 26 14:09:08 2017 +0000 +++ b/Sources/main.cpp Tue May 02 08:00:19 2017 +0000 @@ -37,13 +37,7 @@ Robot sam( &left, &right, &powerSignal, leds, &FarbVoltage, &frontS, &leftS, &rightS, &servoArm); //Implement the Farbsensor into the Robot init function!! -void initializeDistanceSensors(){ - for( int ii = 0; ii<9; ++ii) { - sam.sensors[ii].init(&sensorVoltage, &frontS, &leftS, &rightS, &bit0, &bit1, &bit2, ii); - enable = 1; - } -} /* * / int main(){ @@ -108,12 +102,14 @@ sam.stop(); int done = 0; //1:= finished process; 0:= not finished int fun = 0; //just to test. - + int start = 0; + + while(1){ if(fun == 0){ done = 0; sam.Arm.collecttoback(&done); - done == 0 ? fun = 0 : fun = 1; + done == 0 ? fun = 0 : fun = 1; } else if(fun == 1){ done = 0;