Text LCD "Hello"
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d0-d3 00005 // In BoardOrange, the "RW" signal is unnecessary. 00006 00007 ///////////////////////////////////////////////////// 00008 // main 00009 ///////////////////////////////////////////////////// 00010 int main(void) { 00011 00012 lcd.cls(); 00013 00014 while(1) { 00015 00016 lcd.cls(); 00017 wait(1); 00018 00019 lcd.locate(0,0); 00020 lcd.printf("Hello"); 00021 wait(1); 00022 00023 lcd.locate(0,1); 00024 lcd.printf("mbed"); 00025 wait(1); 00026 } 00027 00028 return 0; 00029 }
Generated on Sat Jul 16 2022 01:40:23 by
1.7.2