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 // Hello World! for the TextLCD 00002 00003 #include "mbed.h" 00004 #include "TextLCD.h" 00005 00006 //TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 00007 TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 00008 00009 00010 DigitalOut DO[4]={LED1, LED2, LED3, LED4}; 00011 00012 void led_blink() 00013 { 00014 for(int n=0; n<4; n++){ 00015 DO[n] = !DO[n]; 00016 } 00017 } 00018 00019 int main() { 00020 double cnt; 00021 cnt = 0.1; 00022 while(1){ 00023 lcd.printf("Hello World!_%.1f\n", cnt); 00024 //lcd.printf("...\n"); 00025 led_blink(); 00026 wait(cnt); 00027 lcd.printf("xxxxxxxxxxxx\n"); 00028 lcd.printf("...\n"); 00029 led_blink(); 00030 wait(cnt); 00031 cnt+=0.1; 00032 if(cnt>=1.0) cnt = 0.1; 00033 } 00034 }
Generated on Tue Aug 16 2022 18:04:21 by
1.7.2