test

Dependencies:   C12832_lcd LCD_fonts mbed

Fork of Christmas-LCD by Peter Drescher

Files at this revision

API Documentation at this revision

Comitter:
kaku_jyoko
Date:
Thu Dec 01 09:41:08 2016 +0000
Parent:
8:3a37f2b9e9e4
Parent:
6:f16ac2dca62d
Commit message:
???

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp.orig Show annotated file Show diff for this revision Revisions of this file
diff -r 3a37f2b9e9e4 -r 9e72c0ff2759 main.cpp
--- a/main.cpp	Thu Dec 01 09:36:08 2016 +0000
+++ b/main.cpp	Thu Dec 01 09:41:08 2016 +0000
@@ -44,7 +44,7 @@
      lcd.locate(5,i);
      //wait(0.002);
      //こんにちは
-     lcd.printf("Happy");
+     //lcd.printf("Happy");
      lcd.locate(5,i+12);
      lcd.printf("Christmas");
      lcd.copy_to_lcd();
diff -r 3a37f2b9e9e4 -r 9e72c0ff2759 main.cpp.orig
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp.orig	Thu Dec 01 09:41:08 2016 +0000
@@ -0,0 +1,59 @@
+#include "mbed.h"
+#include "C12832_lcd.h"
+#include "Arial_9.h"
+#include "Small_7.h"
+#include "graphics.h"
+
+C12832_LCD lcd;
+
+int main()
+{
+    int i,s;
+    lcd.cls();
+    lcd.set_font((unsigned char*) Arial_9);
+    s = 3;
+    lcd.print_bm(bitmTree,95,0);  // print chistmas tree
+    lcd.copy_to_lcd(); 
+    lcd.setmode(XOR);             // XOR - a second print will erase  
+    for(i = -15; i < 75; ){     
+        lcd.print_bm(bitmSan1,i,2);
+        wait(0.05);
+        lcd.copy_to_lcd();           // update lcd  
+        lcd.print_bm(bitmSan1,i,2);  // erase
+        i= i+s;
+        lcd.print_bm(bitmSan2,i,2);  // print next
+        wait(0.05);
+        lcd.copy_to_lcd();           // update lcd   
+        lcd.print_bm(bitmSan2,i,2);  // erase
+        i= i+s;
+        lcd.print_bm(bitmSan3,i,2);  // print next 
+        wait(0.05);
+        lcd.copy_to_lcd();           // update lcd
+        lcd.print_bm(bitmSan3,i,2);  // erase
+        i= i+s;
+   }
+   lcd.print_bm(bitmSan3,i,2);
+   lcd.set_auto_up(0);
+   //こんにちは
+   for(i=-20; i<5; i++){             // scrolling text
+     lcd.locate(5,i);
+     lcd.printf("Happy");
+     lcd.locate(5,i+12);
+     lcd.printf("Christmas");
+     lcd.copy_to_lcd();
+     lcd.locate(5,i);
+     //wait(0.002);
+     //こんにちは
+     lcd.printf("Happy");
+     lcd.locate(5,i+12);
+     lcd.printf("Christmas");
+     lcd.copy_to_lcd();
+     i=i+1;
+   }  
+   lcd.locate(5,i);
+   lcd.printf("Happy");
+   lcd.locate(5,i+12);
+   lcd.printf("Christmas");
+   lcd.copy_to_lcd();
+   
+}