![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
control for robotic arm that can play chess using a granular gripper
Dependencies: Encoder mbed HIDScope Servo MODSERIAL
Fork of chessRobot by
Diff: main.cpp
- Revision:
- 78:0cc7c64ba94c
- Parent:
- 76:0aa90e728e4a
- Child:
- 79:cf500b63f349
diff -r 6c6b9cd550bb -r 0cc7c64ba94c main.cpp --- a/main.cpp Tue Oct 20 12:36:12 2015 +0200 +++ b/main.cpp Tue Oct 20 12:58:13 2015 +0200 @@ -12,7 +12,7 @@ #include "actuators.h" #include "buttons.h" #include "debug.h" -#include "EMG.h" +#include "emg.h" Ticker switches, debug, motor, EMG; volatile bool switches_go=false, debug_go=false, motor_go=false, emg_go= false; @@ -30,14 +30,14 @@ switches.attach(&switches_activate, 0.02f); debug.attach(&debug_activate, 0.03f); motor.attach(&motor_activate, motorCall); -//EMG.attach(&emg_activate, 0.01f); +EMG.attach(&emg_activate, 0.005f); while (true) { - // if(emg_go){ - // emg_go=false; - // readEMG(); - // } + if(emg_go){ + emg_go=false; + readEMG(); + } // servoControl(); if(switches_go){ switches_go=false;