Demo mode
Dependencies: BioroboticsMotorControl mbed
main.cpp
- Committer:
- MAHCSnijders
- Date:
- 2018-11-01
- Revision:
- 1:1e67c5a527cc
- Parent:
- 0:91a5bdab07d3
File content as of revision 1:1e67c5a527cc:
#include "mbed.h" #include "motor.h" #include "Screen.h" InterruptIn Button1(D2); // Right button on interface InterruptIn Button2(D3); // Left button on interface InterruptIn Panic_button(D8); // Red button on interface Screen screen(D14, D15, D9); // Screen interface Motor main_motor(D6, D7, D13, D12); Motor sec_motor(D5, D4, D10, D11); void () int main() { while (true) { screen.clear_display(); screen.display_state_name("Demo mode"); control_goes_up = true; control_goes_right = true; screen.display_up_down_arrow(control_goes_up); screen.display_left_right_arrow(control_goes_right); screen.display(); Button1.fall(); Button2.fall(); if (p_button.is_pressed()) { // For panic state current_state = failure;} } }