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 MODSERIAL
Revision 4:40dc3d3da129, committed 2019-10-28
- Comitter:
- samzijp
- Date:
- Mon Oct 28 12:15:07 2019 +0000
- Parent:
- 1:675b67b2ae02
- Commit message:
- Iets toegevoegd aan het geheel
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 22 08:43:25 2019 +0000
+++ b/main.cpp Mon Oct 28 12:15:07 2019 +0000
@@ -2,9 +2,18 @@
#include "MODSERIAL.h"
#include "QEI.h"
+// LED's
+DigitalOut led_red(LED_RED);
+DigitalOut led_green(LED_GREEN);
+DigitalOut led_blue(LED_BLUE);
+// Modserial
Serial pc(USBTX, USBRX);
+
+
+// ========= State Machine ========= //
+
enum states {WAITING, MOTOR_ANGLE_CLBRT, EMG_CLBRT, HOMING, WAITING4SIGNAL, OPERATION, SHOOTING, DEMO, FAILURE_MODE};
states currentState = WAITING; // Start in waiting state
@@ -17,6 +26,10 @@
break;
case MOTOR_ANGLE_CLBRT:
+ // Description:
+ // In this state the robot moves to a mechanical limit of motion,
+ // in order to calibrate the motors.
+
break;