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
- Committer:
- an_xuanyu
- Date:
- 2021-05-04
- Revision:
- 3:4bc4e762a906
- Parent:
- 2:ce24c50fc0a6
File content as of revision 3:4bc4e762a906:
#include "mbed.h" #include "main1.h" #include "main2.h" #include "main3.h" #include "N5110.h" DigitalIn button_A4(p29); DigitalIn button_B4(p28); DigitalIn button_C4(p27); DigitalIn button_D4(p26); AnalogIn joy_v4(p20); AnalogIn joy_h4(p19); AnalogIn joy_button4(p17); // could be DigitalIn, but use AnalogIn so pot can also be used // JP1 must be in 2/3 position N5110 lcd4(p8,p9,p10,p11,p13,p21); void welcome(); int main() { lcd4.init(); welcome(); } void welcome(){ lcd4.clear(); lcd4.printString("Tank World",15,0); lcd4.printString("A: Single ",4,2); lcd4.printString("B: Double ",4,3); lcd4.printString("C: Exercise",4,4); lcd4.refresh(); wait(0.5); while(1){ if(button_B4.read() == 1){ main2(); wait(0.2); break; } else if(button_A4.read() == 1){ main1(); wait(0.2); break; } else if(button_C4.read() == 1){ wait(0.2); main3(); break; } } }