![](/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:
- 59:fe00be2cf8fd
- Parent:
- 57:43f707648f2b
- Child:
- 60:20945383ad1b
--- a/buttons.cpp Mon Oct 12 11:52:47 2015 +0200 +++ b/buttons.cpp Mon Oct 12 12:16:58 2015 +0200 @@ -26,6 +26,9 @@ float pot1Val = 0; float pot2Val = 0; +float Kp = 1; +float Ki = 0; +float Kd = 0; void checkSwitches(){ @@ -69,7 +72,7 @@ switch (PIDparam){ case 0: // potmeters control P gain redLed.write(0); greenLed.write(1); blueLed.write(1); - float Kp = pot2.read(); + float Kp =3* pot2.read()+1; break; case 1: // potmeters control I gain redLed.write(1); greenLed.write(0); blueLed.write(1);