![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Gripper and Color sensor basic functionality testing.
Dependencies: mbed
driver.cpp
- Committer:
- z_g13
- Date:
- 2016-03-26
- Revision:
- 0:b30091b30223
File content as of revision 0:b30091b30223:
#include "mbed.h" #include "gripper.h" #include "ColorSensor.h" Serial vcom(USBTX, USBRX); float frequency = 50.0f; float duty_cycle = 0.50f; float period = ( 1.0f / frequency ); int main() { vcom.baud(115200); vcom.printf("Hello World!"); Gripper gripper(PTB0, PTB1); ColorSensor colorSensor(PTC2, PTC1); /* gripper.grip(); wait(1.0); gripper.lift(); wait(1.0); gripper.lower(); wait(1.0); gripper.release(); wait(1.0); */ colorSensor.getR(); vcom.printf("%i", colorSensor.getR()); wait(0.5); }