Demo program of library for LCD ACM1602NI connected using I2C interface on Nucleo F401. Nucleo F401RE で使える I2C 接続の LCD ACM1602NI 用のライブラリの使用例.

Dependencies:   ACM1602NI_Nucleo mbed

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Thu Aug 28 08:56:55 2014 +0000
Child:
1:59ae7426ddcc
Commit message:
1

Changed in this revision

ACM1602NI_Nucleo.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/ACM1602NI_Nucleo.lib	Thu Aug 28 08:56:55 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/MikamiUitOpen/code/ACM1602NI_Nucleo/#8167316a0a40
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 28 08:56:55 2014 +0000
@@ -0,0 +1,38 @@
+//------------------------------------------------------------
+// Test program for LCD ACM1602NI using I2C interface
+//      Pullup resistors for SDA and SCL: 4.7 kΩ
+//      MIKAMI, Naoki (c) 2014/08/28
+//------------------------------------------------------------
+
+#include "mbed.h"
+#include "ACM1602NI.hpp"
+using namespace Mikami;
+
+//Acm1602Ni lcd_;                               // Default, OK
+//Acm1602Ni lcd_(D14, D15);                     // OK
+Acm1602Ni lcd_(D14, D15, 200000);             // OK
+//Acm1602Ni lcd_(D14, D15, 200000, true, true); // OK
+//Acm1602Ni lcd_(PB_3, PB_10);                  // OK
+//Acm1602Ni lcd_(PC_9, PA_8);                   // OK
+//Acm1602Ni lcd_(PB_4, PA_8);                   // OK 
+
+Ticker timer_;
+
+// Display 0, 1, 2, .....
+void TimerIsr()
+{
+    static int k = 0;
+    char str[20];
+    sprintf(str, "%d", k++);
+    lcd_.WriteString(str, 0, 1);
+}
+
+int main()
+{
+    lcd_.Clear();
+    lcd_.WriteString("Hello World!");
+
+    timer_.attach(&TimerIsr, 1);
+
+    while (true) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Aug 28 08:56:55 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file