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:
30:a20f16bf8dda
Parent:
29:e4f3455aaa0b
Child:
31:8fbee6c92753

File content as of revision 30:a20f16bf8dda:

#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;

extern PID PIDmotor2;

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


#endif