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

Dependencies:   ACM1602NI_NucleoF4 mbed

Files at this revision

API Documentation at this revision

Comitter:
CQpub0Mikami
Date:
Sun Dec 14 08:19:54 2014 +0000
Parent:
3:4c4455ae5af7
Commit message:
5

Changed in this revision

ACM1602NI_NucleoF4.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
--- a/ACM1602NI_NucleoF4.lib	Sun Dec 14 07:51:41 2014 +0000
+++ b/ACM1602NI_NucleoF4.lib	Sun Dec 14 08:19:54 2014 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/CQpub0Mikami/code/ACM1602NI_NucleoF4/#56a2f5e674e4
+http://developer.mbed.org/users/CQpub0Mikami/code/ACM1602NI_NucleoF4/#8e405cedea99
--- a/main.cpp	Sun Dec 14 07:51:41 2014 +0000
+++ b/main.cpp	Sun Dec 14 08:19:54 2014 +0000
@@ -7,7 +7,7 @@
 //  2014/12/14, Copyright (c) 2014 MIKAMI, Naoki
 //------------------------------------------------------------
 
-#include "mbed.h"
+//#include "mbed.h"
 #include "ACM1602NI.hpp"
 using namespace Mikami;
 
@@ -25,10 +25,12 @@
 void TimerIsr()
 {
     static int k = 0;
+    int sec = k % 60;   // seconds
+    int min = k / 60;   // minits
     char str[20];
-    sprintf(str, "%d", k++);
+    sprintf(str, "%d'%2d\"", min, sec);
     lcd_.WriteStringXY(str, 0, 1);
-    lcd_.WriteString(" sec");
+    k++;
 }
 
 int main()