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
main.cpp
- Committer:
- Jankoekenpan
- Date:
- 2016-11-02
- Revision:
- 5:23c850380b86
- Parent:
- 1:7d218e9d2111
- Child:
- 6:05f73a8474ca
- Child:
- 8:874fe459b10a
File content as of revision 5:23c850380b86:
#include "arm.h" #include "mbed.h" // ====== Hardware stuff ====== Robot robot; AnalogIn emg1(A0); AnalogIn emg2(A1); //====== Types ===== enum DirectionState{UP = true, DOWN = false}; enum ProgramState{CALIBRATING, RUNNING}; //====== Program Variables ====== ProgramState progState; DirectionState dirState; float emg1threshold; float emg2threshold; //====== Functions ====== void calibrate(void) { //Calibrate function -- blocking. } int main() { progState = CALIBRATING; calibrate(); while(true); return 0; }