Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI biquadFilter
Diff: robot.h
- Revision:
- 7:a80cb6b06320
- Parent:
- 3:1f47375270c5
- Child:
- 12:8295c02d740f
--- a/robot.h Wed Nov 02 09:26:38 2016 +0000 +++ b/robot.h Wed Nov 02 16:29:13 2016 +0000 @@ -1,30 +1,21 @@ #include "arm.h" +#include "PID_controller.h" +#include "geometry.h" class Robot { private: // Arms Arm upperArm; Arm lowerArm; - // Roller position - float x; - float y; - // Ticker - Ticker ticker; - // Safety button - InterruptIn killButton; - - void doTick(); + + // Safety first! + volatile bool killed; public: + // Constructor Robot(); -// void setX(float x); -// void setY(float y); - // Move only on the x axis - void moveX(float dx); - // Move only on the y axis - void moveY(float dy); - // Set arm lengths -// void setArms(float upper, float lower); + // Update arms + void update(); // Get upper arm length float getUpperArmLength(); // Get lower arm length @@ -35,6 +26,7 @@ void setLowerArmVelocity(float referenceVelocity); // Safety shutdown void kill(); + bool isKilled(); };