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 "mbed.h" 00002 #include "LCD.h" 00003 /* 00004 +----------------------------------------+ 00005 | | 00006 | | 00007 +----------------------------------------+ 00008 RST SCL SDA GND VDD (6) (7) (8) Anode (K) 00009 */ 00010 LCD lcd(p28, p27); // sda scl reset = NC, no-backlight 00011 //LCD lcd(p28, p27, p29); // sda scl reset backlight 00012 //LCD lcd(p9, p10, p8, p11, 32); // sda scl reset backlight contrast 00013 //LCD lcd(p9, p10, p8); 00014 00015 int main() { 00016 lcd.printf("Display Test\n"); 00017 wait(0.2); 00018 lcd.showIcon(LCD::ANTENNA); 00019 wait(0.2); 00020 lcd.showIcon(LCD::PHONE); 00021 wait(0.2); 00022 lcd.showIcon(LCD::ALARM); 00023 wait(0.2); 00024 lcd.showIcon(LCD::INPUT); 00025 wait(0.2); 00026 lcd.showIcon(LCD::UP); 00027 wait(0.2); 00028 lcd.showIcon(LCD::DOWN); 00029 wait(0.2); 00030 lcd.showIcon(LCD::UPDOWN); 00031 wait(0.2); 00032 lcd.showIcon(LCD::LOCK); 00033 wait(0.2); 00034 lcd.showIcon(LCD::NO_SOUND); 00035 wait(0.2); 00036 lcd.showIcon(LCD::BATTERY0); 00037 wait(0.2); 00038 lcd.showIcon(LCD::BATTERY1); 00039 wait(0.2); 00040 lcd.showIcon(LCD::BATTERY2); 00041 wait(0.2); 00042 lcd.showIcon(LCD::BATTERY3); 00043 wait(0.2); 00044 lcd.showIcon(LCD::MARK); 00045 wait(0.2); 00046 lcd.hideIcon(LCD::ALL); 00047 lcd.setBacklight(true); 00048 for (int i = 0; i < 100; i++) { 00049 lcd.printf("value = %d\n", i); 00050 wait(0.1); 00051 } 00052 lcd.setBacklight(false); 00053 lcd.printf("Hello World, Good-bye world!"); 00054 wait(1.0); 00055 lcd.showIcon(LCD::ALL); 00056 }
Generated on Tue Jul 12 2022 15:11:55 by
1.7.2