control for robotic arm that can play chess using a granular gripper
Dependencies: Encoder mbed HIDScope Servo MODSERIAL
Fork of chessRobot by
buttons.cpp@25:874675516927, 2015-10-06 (annotated)
- Committer:
- annesteenbeek
- Date:
- Tue Oct 06 14:24:40 2015 +0000
- Revision:
- 25:874675516927
- Parent:
- 18:97eeb2686a6a
- Child:
- 27:5eb5ec295ab2
correct header file pointer declaration. Buildable code.
Who changed what in which revision?
User | Revision | Line number | New 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 | 25:874675516927 | 7 | AnalogIn pot1(pot1Pin); |
annesteenbeek | 0:525558a26464 | 8 | |
annesteenbeek | 0:525558a26464 | 9 | void checkSwitches(){ |
annesteenbeek | 0:525558a26464 | 10 | // read motor enable switch |
annesteenbeek | 0:525558a26464 | 11 | |
annesteenbeek | 0:525558a26464 | 12 | // read pump enable switch |
annesteenbeek | 0:525558a26464 | 13 | |
annesteenbeek | 0:525558a26464 | 14 | // read servo potmeter position |
annesteenbeek | 0:525558a26464 | 15 | |
annesteenbeek | 0:525558a26464 | 16 | // read x speed potmeter position |
annesteenbeek | 25:874675516927 | 17 | motorSetSpeed1 = pot1.read(); |
annesteenbeek | 0:525558a26464 | 18 | |
annesteenbeek | 0:525558a26464 | 19 | // read y speed potmeter position |
annesteenbeek | 0:525558a26464 | 20 | |
annesteenbeek | 0:525558a26464 | 21 | // read killswitches |
annesteenbeek | 0:525558a26464 | 22 | |
annesteenbeek | 0:525558a26464 | 23 | } |