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: BioroboticsMotorControl mbed
main.cpp
00001 #include "mbed.h" 00002 #include "motor.h" 00003 #include "Screen.h" 00004 00005 InterruptIn Button1(D2); // Right button on interface 00006 InterruptIn Button2(D3); // Left button on interface 00007 InterruptIn Panic_button(D8); // Red button on interface 00008 Screen screen(D14, D15, D9); // Screen interface 00009 Motor main_motor(D6, D7, D13, D12); 00010 Motor sec_motor(D5, D4, D10, D11); 00011 00012 void () 00013 00014 00015 00016 int main() 00017 { 00018 while (true) 00019 { 00020 screen.clear_display(); 00021 screen.display_state_name("Demo mode"); 00022 00023 control_goes_up = true; 00024 control_goes_right = true; 00025 00026 screen.display_up_down_arrow(control_goes_up); 00027 screen.display_left_right_arrow(control_goes_right); 00028 screen.display(); 00029 00030 Button1.fall(); 00031 Button2.fall(); 00032 00033 if (p_button.is_pressed()) { // For panic state 00034 current_state = failure;} 00035 00036 00037 } 00038 }
Generated on Thu Jul 14 2022 01:26:07 by
1.7.2