![](/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: buttons.cpp
- Revision:
- 30:a20f16bf8dda
- Parent:
- 27:5eb5ec295ab2
- Child:
- 32:2006977785f5
--- a/buttons.cpp Tue Oct 06 17:55:11 2015 +0000 +++ b/buttons.cpp Tue Oct 06 21:06:20 2015 +0000 @@ -5,6 +5,7 @@ // functions for reading all the buttons and switches AnalogIn pot2(pot2Pin); +AnalogIn pot1(pot1Pin); void checkSwitches(){ // read motor enable switch @@ -14,10 +15,10 @@ // read servo potmeter position // read x speed potmeter position - motorSetSpeed2 = pot2.read(); + motorSetSpeed2 = 300*pot2.read(); // read y speed potmeter position - + motorSetSpeed2 = motorSetSpeed2 - 300*pot1.read(); // read killswitches } \ No newline at end of file