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:
- namcheol
- Date:
- 2020-05-11
- Revision:
- 1:7d8d28904f02
- Parent:
- 0:f31836d48420
File content as of revision 1:7d8d28904f02:
#include "mbed.h" #include "C12832.h" C12832 lcd(D11, D13, D12, D7, D10); //lcd = (MOSI, SCK, RESET, A0, nCS) DigitalIn up(A2); DigitalIn down(A3); DigitalIn left(A4); DigitalIn rite(A5); DigitalIn center(D4); int main() { lcd.cls(); //clear screen lcd.locate(0, 6); lcd.printf("Move Joystick!"); while(true) { if(up) { lcd.locate(0,16); lcd.printf("Up "); } else if(down) { lcd.locate(0,16); lcd.printf("Down "); } else if(left) { lcd. locate(0,16); lcd.printf("Left "); } else if(rite) { lcd.locate(0,16); lcd.printf("Right "); } else if(center) { lcd.locate(0,16); lcd.printf("Center "); } } }