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

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

config.h

Committer:
annesteenbeek
Date:
2015-10-05
Revision:
5:73bfad06b775
Parent:
4:80e2280058ed
Child:
6:b957d8809e7c

File content as of revision 5:73bfad06b775:

// All the definitions and variables
#define pot1Pin A0

// MOTORS
#define motor2DirPin D4
#define motor2PWMPin D5

#define motor1DirPin D7
#define motor1PWMPin D6

#define enc1A D11
#define enc1B D10
#define enc2A D13
#define enc2B D12

#define pwm_frequency 10000

bool motorEnable = false;

bool direction1 = false; // CCW is false(positive rotation), CW is true (neg rotation)
bool direction2 = false;

double motor1Pos = 0;
double motor2Pos = 0;

double motorSpeed1 = 0;
double motorSpeed2 = 0;

double motorSetSpeed1 = 0;
double motorSetSpeed2 = 0;


double motorPWM1 = 0;
double motorPWM2 = 0;

// Set PID values
double Kp1 = 1; 
double Ki1 = 1; 
double Kd1 = 1;

double Kp2 = 1; 
double Ki2 = 1; 
double Kd2 = 1;