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

Dependencies:   Encoder mbed HIDScope Servo MODSERIAL

Fork of chessRobot by a steenbeek

buttons.cpp

Committer:
annesteenbeek
Date:
2015-10-06
Revision:
30:a20f16bf8dda
Parent:
27:5eb5ec295ab2
Child:
32:2006977785f5

File content as of revision 30:a20f16bf8dda:

#include "buttons.h"
#include "mbed.h"
#include "config.h"
#include "actuators.h"
// functions for reading all the buttons and switches 

AnalogIn pot2(pot2Pin);
AnalogIn pot1(pot1Pin);

void checkSwitches(){
    // read motor enable switch
    
    // read pump enable switch
    
    // read servo potmeter position
    
    // read x speed potmeter position
        motorSetSpeed2 = 300*pot2.read();
    
    // read y speed potmeter position
        motorSetSpeed2 = motorSetSpeed2 - 300*pot1.read();
    // read killswitches
    
    }