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

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

Committer:
annesteenbeek
Date:
Wed Oct 21 12:09:45 2015 +0000
Revision:
95:94f02d01ebdf
Parent:
94:28e274481b60
Merge;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
annesteenbeek 1:80f098c05d4b 1 // All the definitions and variables
annesteenbeek 78:0cc7c64ba94c 2 // #define TUNEPID // set to switch between normal opperation or tuning PID
annesteenbeek 78:0cc7c64ba94c 3 // #define TUNEEMG // set hdiscope for EMG
annesteenbeek 78:0cc7c64ba94c 4 #define TUNEPWM // set hidscope for rest
annesteenbeek 57:43f707648f2b 5
bjornnijhuis 70:20e1a73ab134 6 // Analog inputs for EMG
bjornnijhuis 70:20e1a73ab134 7 #define EMG1in A0
bjornnijhuis 70:20e1a73ab134 8 #define EMG2in A1
annesteenbeek 1:80f098c05d4b 9
annesteenbeek 86:a5f48ae7096e 10 #define startPin PTC6
annesteenbeek 86:a5f48ae7096e 11
bjornnijhuis 70:20e1a73ab134 12 // Analog inputs for potmeters
bjornnijhuis 70:20e1a73ab134 13 #define pot1Pin A2
bjornnijhuis 70:20e1a73ab134 14 #define pot2Pin A3
bjornnijhuis 70:20e1a73ab134 15
annesteenbeek 73:05cd0e692b74 16 #define safetyPin D2
annesteenbeek 73:05cd0e692b74 17
annesteenbeek 88:dd198c58f053 18 #define button1Pin D0
annesteenbeek 88:dd198c58f053 19 #define button2Pin D1
annesteenbeek 32:2006977785f5 20
annesteenbeek 31:8fbee6c92753 21 // Servo
bjornnijhuis 70:20e1a73ab134 22 #define servoPin D9
annesteenbeek 31:8fbee6c92753 23
annesteenbeek 5:73bfad06b775 24 // MOTORS
bjornnijhuis 70:20e1a73ab134 25 #define motor2DirPin D4
bjornnijhuis 70:20e1a73ab134 26 #define motor2PWMPin D5
annesteenbeek 3:47c76be6d402 27
bjornnijhuis 70:20e1a73ab134 28 #define motor1DirPin D7
bjornnijhuis 70:20e1a73ab134 29 #define motor1PWMPin D6
annesteenbeek 3:47c76be6d402 30
bjornnijhuis 70:20e1a73ab134 31 #define enc1A D11
bjornnijhuis 70:20e1a73ab134 32 #define enc1B D10
bjornnijhuis 70:20e1a73ab134 33 #define enc2A D13
bjornnijhuis 70:20e1a73ab134 34 #define enc2B D12
annesteenbeek 3:47c76be6d402 35
bjornnijhuis 70:20e1a73ab134 36 // Motor control constants
bjornnijhuis 70:20e1a73ab134 37 #define pwm_frequency 50000