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

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

Revision:
39:41635b1b11de
Parent:
38:2c18429ad352
Child:
40:0d88aa25a57d
--- a/buttons.cpp	Wed Oct 07 23:26:59 2015 +0200
+++ b/buttons.cpp	Thu Oct 08 00:39:57 2015 +0200
@@ -3,7 +3,6 @@
 #include "config.h"
 #include "actuators.h"
 // functions for reading all the buttons and switches 
-int a =3;
 AnalogIn pot2(pot2Pin);
 AnalogIn pot1(pot1Pin);
 
@@ -18,8 +17,8 @@
 
 AnalogIn button1(button1Pin);
 AnalogIn button2(button2Pin);
-int prevState1 = 0;
-int prevState2 = 0;
+float prevState1 = 1;
+float prevState2 = 1;
 int actuatorState = 0;
 
 float pot1Val = 0;