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.
Fork of TextLCD_HelloWorld by
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 TextLCD lcd(p24, p26, p27, p28, p29, p30); 00005 00006 int main(void) { 00007 int x = 0, y = 0; 00008 00009 lcd.cls(); 00010 lcd.locate(0, 0); 00011 lcd.printf("A"); 00012 00013 while(-1) { 00014 y = y % 2; 00015 switch(y){ 00016 case 0: 00017 x++; 00018 break; 00019 case 1: 00020 x--; 00021 break; 00022 default: 00023 break; 00024 } 00025 wait(0.5); 00026 lcd.cls(); 00027 lcd.locate(x, y); 00028 lcd.printf("A"); 00029 00030 if(x == 0 && y == 1){ 00031 x--; 00032 y = 0; 00033 } 00034 if(x == 15 && y == 0){ 00035 x++; 00036 y = 1; 00037 } 00038 } 00039 }
Generated on Wed Jul 20 2022 12:14:47 by
1.7.2
