test

Dependencies:   NokiaLCD_6100_o mbed

Files at this revision

API Documentation at this revision

Comitter:
SES01
Date:
Wed Apr 19 08:19:26 2017 +0000
Commit message:
????

Changed in this revision

NokiaLCD_6100.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NokiaLCD_6100.lib	Wed Apr 19 08:19:26 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/NITHC-SystemEngineerS-Club/code/NokiaLCD_6100_o/#b5abb1c0b375
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 19 08:19:26 2017 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "NokiaLCD.h"
+
+NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::PCF8833); // mosi, sclk, cs, rst, type
+//                                                  橙  白  緑 紫
+int main() {
+  int bgcolor=0;
+  lcd.background(0x0000FF);
+  while(1){
+
+    switch(bgcolor++)
+    {
+      case 0 :lcd.background(0x800000); break;
+      case 1 :lcd.background(0x008000); break;
+      case 2 :lcd.background(0x000080); bgcolor=0; break;
+    }
+
+    lcd.cls();
+    lcd.fill(1, 20, 128, 10, 0x00ff00);     // 緑
+    lcd.fill(0, 70, 130, 10, 0x0000ff);     // 青
+    lcd.fill(50, 1, 10, 128, 0xFF0000);     // 赤
+    for(int i=0; i<3; i++) {
+      lcd.locate(0,i+12);
+      lcd.printf("Hello World!miz%d", i);
+    }
+    for (int i=0; i<130; i++) {
+        lcd.pixel(i, 60 + sin((float)i / 5.0)*10, 0xffffff);
+    }
+    wait_us(33333);
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Apr 19 08:19:26 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file