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.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
lcd.cpp
00001 #include "mbed.h" 00002 /* 00003 void lcdInit() 00004 { 00005 lcd.baud(4800); 00006 lcd.printf("4800"); 00007 lcd.printf("%c%c", 0x7C, 13); 00008 lcd.baud(9600); 00009 lcd.printf("9600"); 00010 } 00011 00012 void lcdClear() 00013 { 00014 lcd.printf("%c%c",0xFE,0x01); // command, clear 00015 wait(0.020); 00016 } 00017 00018 void lcdSetPos(int x, int y) 00019 { 00020 uint8_t pos=0; 00021 00022 if ( x >= 0 && x < 16 && y >= 0 && y < 2) 00023 pos = x + y*64; 00024 00025 pos |= (1<<7); 00026 00027 lcd.printf("%c%c",0xFE,pos); 00028 } 00029 00030 void lcdSetSplash(const char *s1, const char *s2) 00031 { 00032 lcdClear(); 00033 lcd.printf(s1); 00034 lcdSetPos(0,1); 00035 lcd.printf(s2); 00036 lcd.printf("%c%c",0x7C,0x0A); 00037 } 00038 */
Generated on Tue Jul 12 2022 21:36:18 by
1.7.2