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:
Tue Oct 06 21:06:20 2015 +0000
Revision:
30:a20f16bf8dda
Parent:
27:5eb5ec295ab2
Child:
32:2006977785f5
divided functions with Tickers and working PID;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
annesteenbeek 14:0c0d1bfd94ea 1 #include "buttons.h"
annesteenbeek 14:0c0d1bfd94ea 2 #include "mbed.h"
annesteenbeek 17:872fcf85116d 3 #include "config.h"
annesteenbeek 25:874675516927 4 #include "actuators.h"
annesteenbeek 0:525558a26464 5 // functions for reading all the buttons and switches
annesteenbeek 2:95ba9f6f0128 6
annesteenbeek 27:5eb5ec295ab2 7 AnalogIn pot2(pot2Pin);
annesteenbeek 30:a20f16bf8dda 8 AnalogIn pot1(pot1Pin);
annesteenbeek 0:525558a26464 9
annesteenbeek 0:525558a26464 10 void checkSwitches(){
annesteenbeek 0:525558a26464 11 // read motor enable switch
annesteenbeek 0:525558a26464 12
annesteenbeek 0:525558a26464 13 // read pump enable switch
annesteenbeek 0:525558a26464 14
annesteenbeek 0:525558a26464 15 // read servo potmeter position
annesteenbeek 0:525558a26464 16
annesteenbeek 0:525558a26464 17 // read x speed potmeter position
annesteenbeek 30:a20f16bf8dda 18 motorSetSpeed2 = 300*pot2.read();
annesteenbeek 0:525558a26464 19
annesteenbeek 0:525558a26464 20 // read y speed potmeter position
annesteenbeek 30:a20f16bf8dda 21 motorSetSpeed2 = motorSetSpeed2 - 300*pot1.read();
annesteenbeek 0:525558a26464 22 // read killswitches
annesteenbeek 0:525558a26464 23
annesteenbeek 0:525558a26464 24 }