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
main.cpp
- Committer:
- samzijp
- Date:
- 2019-10-28
- Revision:
- 4:40dc3d3da129
- Parent:
- 1:675b67b2ae02
File content as of revision 4:40dc3d3da129:
#include "mbed.h"
#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
void state_machine(void){
switch(current_state){
case WAITING:
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;
case EMG_CLBRT:
break;
case HOMING:
break;
case WAITING4SIGNAL:
break;
case OPERATION:
break;
case SHOOTING:
break;
case DEMO:
break;
case FAILURE_MODE:
break;
int main()
{
}
}