control for robotic arm that can play chess using a granular gripper

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

Files at this revision

API Documentation at this revision

Comitter:
annesteenbeek
Date:
Thu Oct 29 17:41:10 2015 +0000
Parent:
124:f67ce69557db
Child:
126:56866cefaa08
Commit message:
adding interface and switch for angle/pos, buildable

Changed in this revision

MODSERIAL.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
serialcom.cpp Show annotated file Show diff for this revision Revisions of this file
serialcom.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MODSERIAL.lib	Thu Oct 29 17:41:10 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Sissors/code/MODSERIAL/#6ffa97119f4f
--- a/main.cpp	Thu Oct 29 18:23:08 2015 +0100
+++ b/main.cpp	Thu Oct 29 17:41:10 2015 +0000
@@ -15,7 +15,7 @@
 #include "emg.h"
 #include "serialcom.h"
 
-Ticker switchesTick, debugTick, motorTick, EMGTick, safetyTick serialTick;
+Ticker switchesTick, debugTick, motorTick, EMGTick, safetyTick, serialTick;
 volatile bool switches_go=false, debug_go=false, motor_go=false, emg_go=false, safety_go=false, serial_go=false;
 
 void switches_activate(){switches_go=true;};
--- a/serialcom.cpp	Thu Oct 29 18:23:08 2015 +0100
+++ b/serialcom.cpp	Thu Oct 29 17:41:10 2015 +0000
@@ -1,7 +1,9 @@
 #include "mbed.h"
+#include "serialcom.h"
 #include "MODSERIAL.h"
 #include "config.h"
 #include "PID.h"
+#include "buttons.h"
 #include <string>
 
 MODSERIAL pc(USBTX, USBRX);
@@ -10,13 +12,13 @@
 void serialCom(){
     pc.scanf("%s", buf);
     if(strcmp(buf,"ledRed")==0){
-        ledRed.write(!ledRed.read());
+        redLed.write(!redLed.read());
     }
     if(strcmp(buf,"ledBlue")==0){
-        ledBlue.write(!ledBlue.read());
+        blueLed.write(!blueLed.read());
     }
     if(strcmp(buf,"ledGreen")==0){
-        ledGreen.write(!ledGreen.read());
+        greenLed.write(!greenLed.read());
     }
 }
 
--- a/serialcom.h	Thu Oct 29 18:23:08 2015 +0100
+++ b/serialcom.h	Thu Oct 29 17:41:10 2015 +0000
@@ -1,8 +1,10 @@
 #ifndef SERIALCOM_H
 #define SERIALCOM_H
 
+#include "mbed.h"
 #include "PID.h"
-#include "mbed.h"
+#include "buttons.h"
+#include "config.h"
 
 extern PID motor1PID;
 extern PID motor2PID;