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: test_main.cpp.orig
- Revision:
- 19:a82b55a15457
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test_main.cpp.orig Thu Nov 03 16:31:28 2016 +0000
@@ -0,0 +1,60 @@
+//#include "mbed.h"
+//#include "robot.h"
+//
+//// ====== Hardware stuff ======
+//
+//Robot robot;
+//
+//AnalogIn emg1(A0);
+//AnalogIn emg2(A1);
+//
+//DigitalOut red(LED_RED);
+//DigitalOut green(LED_GREEN);
+//DigitalOut blue(LED_BLUE);
+//
+////====== Constants =====
+//
+//enum RobotCommand{NOTHING, UP, DOWN, FORWARD, BACKWARD};
+//enum ProgramState{CALIBRATING, UPDOWN, FORBACK};
+//
+//const float sampleFrequency = 500;
+//const float sampleTime = 1.0f/sampleFrequency;
+//
+//
+////====== Program Variables ======
+//
+//ProgramState progState;
+//RobotCommand robotCommand;
+//
+//
+////====== Functions ======
+//
+//
+//void calibrate(void) {
+// //Calibrate function -- blocking.
+// //Calculates and sets both emg1threshold and emg2 threshold
+//
+//
+//
+//}
+//
+//void run() {
+// //Run function -- blocking
+// //runs the calibrated robot
+//
+//}
+//
+//
+////int main() {
+//// progState = CALIBRATING;
+////
+//// calibrate();
+////
+//// progState = UPDOWN;
+//// robotCommand = NOTHING;
+////
+//// run();
+////
+//// while(true);
+//// return 0;
+////}
\ No newline at end of file