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

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

debug.cpp

Committer:
annesteenbeek
Date:
2015-10-20
Revision:
78:0cc7c64ba94c
Parent:
62:6c566e6f9664
Child:
88:dd198c58f053

File content as of revision 78:0cc7c64ba94c:

#include "mbed.h"
#include "debug.h"
#include "HIDScope.h"
#include "buttons.h"
#include "actuators.h"
#include "config.h"
// all the debugging functions


#ifdef TUNEPID
HIDScope scope(5);

void debugProcess(){
    scope.set(0, motor2PID.getKp());
	scope.set(1, motor2PID.getKi());
	scope.set(2, motor2PID.getKd());
	scope.set(3, motor2SetSpeed);
	scope.set(4, motor2Speed);
	scope.set(5, motor2PWM);
    scope.send();
}

#endif
#ifdef TUNEPWM
HIDScope scope(4);

void debugProcess(){
    scope.set(0, motor2Pos);
	scope.set(1, motor2SetSpeed);
	scope.set(2, motor2Speed);
	scope.set(3, motor2PWM);
    scope.send();
}

#endif

#ifdef TUNEEMG
HIDScope    scope(4);                   // Number of scopes

void debugProcess(){
    scope.set(0,x_velocity);
    scope.set(1,y_velocity);
    scope.set(2,pump);
    scope.set(3,DOF);
    scope.send();
}
#endif