![](/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
main.cpp
- Committer:
- annesteenbeek
- Date:
- 2015-10-07
- Revision:
- 31:8fbee6c92753
- Parent:
- 30:a20f16bf8dda
- Child:
- 32:2006977785f5
File content as of revision 31:8fbee6c92753:
#include "mbed.h" #include "config.h" // settings and pin configurations #include "actuators.h" #include "buttons.h" #include "debug.h" Ticker switches, debug, motor; volatile bool switches_go=false, debug_go=false, motor_go=false; void switches_activate(){switches_go=true;}; void debug_activate(){debug_go=true;}; void motor_activate(){motor_go=true;}; int main(){ motorInit(); switches.attach(&switches_activate, 0.19f); debug.attach(&debug_activate, 0.21f); motor.attach(&motor_activate, 0.2f); while (true) { // readEMG(); // servoControl(); if(switches_go){ switches_go=false; checkSwitches(); } if(debug_go){ debug_go=false; debugProcess(); } if(motor_go){ motor_go=false; motorControl(); } } }