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

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

actuators.h

Committer:
annesteenbeek
Date:
2015-10-06
Revision:
25:874675516927
Parent:
13:4837b36b9a68
Child:
26:0a9e4147a31a

File content as of revision 25:874675516927:

#ifndef ACTUATORS_H
#define ACTUATORS_H

#include "PID.h"
#include "mbed.h"
#include "config.h"
#include "encoder.h"


extern bool motorEnable;

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

extern float motor1Pos;
extern float motor2Pos;

extern float motorSpeed1;
extern float motorSpeed2;

extern float motorSetSpeed1;
extern float motorSetSpeed2;


extern float motorPWM1;
extern float motorPWM2;

// Set PID values
extern float Kp1; 
extern float Ki1; 
extern float Kd1;

extern float Kp2; 
extern float Ki2; 
extern float Kd2;

extern float PIDinterval;


void motorInit();
void initPID();
void motorControl();
void servoControl();


#endif