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.
main.cpp
00001 #include "mbed.h" 00002 #include "main1.h" 00003 #include "main2.h" 00004 #include "main3.h" 00005 #include "N5110.h" 00006 00007 DigitalIn button_A4(p29); 00008 DigitalIn button_B4(p28); 00009 DigitalIn button_C4(p27); 00010 DigitalIn button_D4(p26); 00011 AnalogIn joy_v4(p20); 00012 AnalogIn joy_h4(p19); 00013 AnalogIn joy_button4(p17); // could be DigitalIn, but use AnalogIn so pot can also be used 00014 // JP1 must be in 2/3 position 00015 N5110 lcd4(p8,p9,p10,p11,p13,p21); 00016 00017 void welcome(); 00018 00019 int main() { 00020 00021 lcd4.init(); 00022 00023 welcome(); 00024 } 00025 00026 void welcome(){ 00027 lcd4.clear(); 00028 lcd4.printString("Tank World",15,0); 00029 lcd4.printString("A: Single ",4,2); 00030 lcd4.printString("B: Double ",4,3); 00031 lcd4.printString("C: Exercise",4,4); 00032 lcd4.refresh(); 00033 wait(0.5); 00034 while(1){ 00035 if(button_B4.read() == 1){ 00036 main2(); 00037 wait(0.2); 00038 break; 00039 } 00040 else if(button_A4.read() == 1){ 00041 main1(); 00042 wait(0.2); 00043 break; 00044 } 00045 else if(button_C4.read() == 1){ 00046 wait(0.2); 00047 main3(); 00048 break; 00049 } 00050 } 00051 }
Generated on Wed Jul 27 2022 08:00:53 by
