code
Dependencies: ContinuousServo Final Project ES202 KANG TRUONG ADAMS TCS3472_I2C Tach
PROJECT.cpp
- Committer:
- kingkang2
- Date:
- 2018-04-19
- Revision:
- 2:9ab67bed1a34
- Parent:
- 1:8a2bdbd69fba
- Child:
- 3:8d12cc699e4c
File content as of revision 2:9ab67bed1a34:
#include "mbed.h" #include "ContinuousServo.h" #include "Tach.h" #include "TCS3472_I2C.h" Serial pc(USBTX,USBRX); // color sensor TCS3472_I2C rgb_sensor( p9, p10 ); // Establish RGB sensor object // Hall effect sensor DigitalIn hall(p22); // sonar sensor AnalogIn sonar(p20); // range sensor 9.8 mV/inch //servos ContinuousServo left(p23); ContinuousServo right(p26); //encoders Tach tLeft(p17,64); Tach tRight(p13,64); //drive straight w = 0; v = 0.5;