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 "TextLCD.h" 00002 #include "mbed.h" 00003 00004 00005 TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4); // rs, e, d4-d7 00006 DigitalOut led1(LED1); 00007 DigitalOut led2(LED2); 00008 DigitalOut led3(LED3); 00009 DigitalOut led4(LED4); 00010 int main() { 00011 00012 while(1) 00013 { 00014 lcd.cls(); 00015 wait(0.5); 00016 led1=1; 00017 lcd.locate(0,0); 00018 lcd.printf("Hello World1\n"); 00019 wait(5); 00020 led2=1; 00021 lcd.locate(6,1); 00022 lcd.printf("Hello World2\n"); 00023 wait(5); 00024 led3=1; 00025 lcd.locate(0,2); 00026 lcd.printf("Hello World3\n"); 00027 wait(5); 00028 led4=1; 00029 lcd.locate(8,3); 00030 lcd.printf("Hello World4\n"); 00031 wait(0.5); 00032 led1=0; 00033 led2=0; 00034 led3=0; 00035 led4=0; 00036 lcd.cls(); 00037 } 00038 }
Generated on Sun Jul 24 2022 10:51:17 by
1.7.2