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: NokiaLCD_6100_o mbed
main.cpp
00001 #include "mbed.h" 00002 #include "NokiaLCD.h" 00003 00004 NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::PCF8833); // mosi, sclk, cs, rst, type 00005 // 橙 白 緑 紫 00006 int main() { 00007 int bgcolor=0; 00008 lcd.background(0x0000FF); 00009 while(1){ 00010 00011 switch(bgcolor++) 00012 { 00013 case 0 :lcd.background(0x800000); break; 00014 case 1 :lcd.background(0x008000); break; 00015 case 2 :lcd.background(0x000080); bgcolor=0; break; 00016 } 00017 00018 lcd.cls(); 00019 lcd.fill(1, 20, 128, 10, 0x00ff00); // 緑 00020 lcd.fill(0, 70, 130, 10, 0x0000ff); // 青 00021 lcd.fill(50, 1, 10, 128, 0xFF0000); // 赤 00022 for(int i=0; i<3; i++) { 00023 lcd.locate(0,i+12); 00024 lcd.printf("Hello World!miz%d", i); 00025 } 00026 for (int i=0; i<130; i++) { 00027 lcd.pixel(i, 60 + sin((float)i / 5.0)*10, 0xffffff); 00028 } 00029 wait_us(33333); 00030 } 00031 }
Generated on Sat Jul 16 2022 11:57:58 by
1.7.2