with the tof code
Dependencies: mbed Servo ros_lib_kinetic
Diff: main.cpp
- Revision:
- 3:df6160e2f6d9
- Parent:
- 2:6197e1cf2cd1
- Child:
- 4:36a04230554d
--- a/main.cpp Thu Oct 24 14:24:27 2019 +0000 +++ b/main.cpp Thu Oct 24 14:37:51 2019 +0000 @@ -3,7 +3,6 @@ Description: Main program loop --------------------------------------------------------------------------------*/ #include "mbed.h" -#include "Motor.h" #include "TOF.h" Serial pc(SERIAL_TX, SERIAL_RX, 9600); // set-up serial to pc @@ -15,7 +14,6 @@ DigitalOut TOF7(PG_2); cAdafruit_VL6180X VL6180X(TOF1,TOF3,TOF5,TOF7); //Define TOF sensor class and initialise devices -cMotor LMotor(M1_PWM, M1_IN1, M1_IN2), RMotor(M2_PWM, M2_IN1, M2_IN2); /*-------------------------------------------------------------------------------- Function name: ServiceTOF @@ -39,7 +37,6 @@ return range; } - /*-------------------------------------------------------------------------------- Function name: main Input Parameters: N/A @@ -51,9 +48,6 @@ uint8_t TOFRange[4]; //Array to store TOF measurements 0-sensor1, 1-sensor3, 2-sensor5, 3-sensor7 while(1) { - //LMotor.Backwards(0.2); - //RMotor.Backwards(0.2); - //Perform TOF measurements TOFRange[0] = serviceTOF(ADDR1); @@ -66,6 +60,5 @@ //Short delay wait(0.1); - } } \ No newline at end of file