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.
Diff: main.cpp
- Revision:
- 2:d2d66ce72529
- Parent:
- 1:5c99971e3ee5
- Child:
- 3:d4b979f6f27e
diff -r 5c99971e3ee5 -r d2d66ce72529 main.cpp
--- a/main.cpp Wed Jun 05 13:37:04 2019 +0000
+++ b/main.cpp Sat Jun 08 06:31:15 2019 +0000
@@ -1,7 +1,7 @@
#include "mbed.h"
#include "TextLCD.h"
-#define LED_TIME 0.5
+#define LED_TIME 0.2
DigitalOut myled(P0_22);
Serial pc(USBTX, USBRX);
@@ -14,19 +14,20 @@
lcd.cls();
lcd.locate(0,0);
// 01234567890123456
- //lcd.printf("ABCDEFGHIJKLMNO");
- lcd.printf("abcd");
+ lcd.printf("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+
+ lcd.cursor_on();
+ lcd.blink_on();
lcd.locate(0,1);
lcd.printf("abcdefghijklmnopqrstuvwxyz");
lcd.home();
- lcd.printf("AB");
wait(1);
lcd.noDisplay(); //ディスプレイ表示OFF
- lcd.printf("CD");//表示OFFのままprint
+ lcd.printf("0123");//表示OFFのままprint
wait(1);
lcd.display(); //ディスプレイ表示ON(OFFのままprintしても反映されている)
@@ -42,26 +43,52 @@
lcd.noCursor(); //カーソル表示OFF
- lcd.scrollDisplayLeft();
+ lcd.shiftDisplayLeft();
wait(1);
- lcd.scrollDisplayLeft();
+ lcd.shiftDisplayLeft();
wait(1);
- lcd.scrollDisplayLeft();
+ lcd.shiftDisplayLeft();
wait(1);
- lcd.scrollDisplayRight();
+ lcd.shiftDisplayRight();
wait(1);
- lcd.scrollDisplayRight();
+ lcd.shiftDisplayRight();
wait(1);
- lcd.scrollDisplayRight();
+ lcd.shiftDisplayRight();
wait(1);
lcd.cls();
lcd.locate(10,0);
lcd.leftToRight();
- lcd.printf("01234");
+ lcd.printf("5678");
+ wait(1);
+ lcd.locate(3,0);
+ lcd.rightToLeft();
+ lcd.printf("1234567890");
+ lcd.shiftDisplayRight();
+ lcd.shiftDisplayRight();
+ lcd.shiftDisplayRight();
+
+ lcd.leftToRight();
+
+ lcd.cls();
+ lcd.home();
wait(1);
-// lcd.locate(10,0);
-// lcd.rightToLeft();
-// lcd.printf("56789");
+
+ lcd.AutoScroll();
+ lcd.locate(8,0);
+ lcd.printf("1");
+ wait(1);
+ lcd.printf("2");
+ wait(1);
+ lcd.printf("3");
+ wait(1);
+ lcd.printf("4");
+ wait(1);
+
+
+ lcd.noAutoScroll();
+
+
+ //lcd.printf("Demo is COMPLETE!");
while(1) {