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: UIT_ACM1602NI mbed
Revision 0:132eb47d57fb, committed 2015-07-06
- Comitter:
- MikamiUitOpen
- Date:
- Mon Jul 06 09:46:13 2015 +0000
- Child:
- 1:d5e9bd9b38ad
- Commit message:
- 1
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UIT_ACM1602NI.lib Mon Jul 06 09:46:13 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/MikamiUitOpen/code/UIT_ACM1602NI/#49e6a8f8fe4f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jul 06 09:46:13 2015 +0000
@@ -0,0 +1,44 @@
+//------------------------------------------------------------
+// Demo program for LCD ACM1602NI using I2C interface
+// Pullup resistors for SDA and SCL: 4.7 kΩ
+// 2015/04/16, Copyright (c) 2015 MIKAMI, Naoki
+//------------------------------------------------------------
+
+#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 elapsed time in minutes and seconds
+void TimerIsr()
+{
+ static int k = 0;
+ int sec = k % 60; // seconds
+ int min = k / 60; // minits
+ char str[20];
+ sprintf(str, "%d'%2d\"", min, sec);
+ lcd_.WriteStringXY(str, 0, 1);
+ k++;
+}
+
+int main()
+{
+ if (lcd_.IsConnected()) printf("\r\nConnected");
+ else printf("\r\nDisconnected");
+
+ lcd_.WriteString("Hello World!");
+
+ TimerIsr();
+ timer_.attach(&TimerIsr, 1);
+
+ while (true) {}
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 06 09:46:13 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889 \ No newline at end of file