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: ACM1602NI_NucleoF4 mbed
Fork of ACM1602NI_NucleoF4_Demo by
Diff: main.cpp
- Revision:
- 0:f0cb74582a7a
- Child:
- 1:2ebec9447a87
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Nov 06 23:51:31 2014 +0000
@@ -0,0 +1,40 @@
+//------------------------------------------------------------
+// Test program for LCD ACM1602NI using I2C interface
+// Pullup resistors for SDA and SCL: 4.7 kΩ
+// MIKAMI, Naoki (c) 2014/10/14
+//------------------------------------------------------------
+
+#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_.WriteStringXY(str, 0, 1);
+ lcd_.WriteString(" sec");
+}
+
+int main()
+{
+ lcd_.Clear();
+ lcd_.WriteString("Hello World!");
+
+ TimerIsr();
+ timer_.attach(&TimerIsr, 1);
+
+ while (true) {}
+}
