hh
Dependencies: VL6180x X_NUCLEO_COMMON X_NUCLEO_IHM01A1 mbed
Fork of 1-DoorCloser_jor by
Diff: main.cpp
- Revision:
- 1:e18e367432bd
- Parent:
- 0:1cb50d31c3b5
- Child:
- 2:f6f12530dbd9
--- a/main.cpp Fri Mar 25 21:27:03 2016 +0000 +++ b/main.cpp Sat Apr 02 09:25:30 2016 +0000 @@ -34,9 +34,9 @@ /* Distance Sensors Component */ DevI2C *i2c =new DevI2C(D14, D15); -VL6180X sensor1(i2c); +/*VL6180X sensor1(i2c); VL6180X sensor2(i2c); -VL6180X sensor3(i2c); +VL6180X sensor3(i2c);*/ /* Functions -----------------------------------------------------------------*/ @@ -58,6 +58,7 @@ } + /* Main ----------------------------------------------------------------------*/ int main() @@ -83,11 +84,15 @@ while(start) { /* Waiting code */ + } while(end) { /* In-game code */ + motor1->Move(StepperMotor::FWD,4096); + motor2->Move(StepperMotor::BWD,4096); + /* Requesting to run backward. */ motor1->Run(StepperMotor::BWD); motor2->Run(StepperMotor::FWD);