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: mbed UIT_AQM1602
Diff: main.cpp
- Revision:
- 4:291e82d910d0
- Parent:
- 3:fe2f8abf2120
- Child:
- 5:d63f1c2d8027
--- a/main.cpp Sun Nov 15 11:40:12 2015 +0000
+++ b/main.cpp Thu Jan 14 05:57:02 2016 +0000
@@ -1,23 +1,35 @@
//------------------------------------------------------------
// Test program for LCD AQM1602XA-RN-GBW using I2C interface
// Pullup resistors for SDA and SCL: 10 kΩ
-// 2015/11/15, Copyright (c) 2015 MIKAMI, Naoki
+// 2016/01/14, Copyright (c) 2015 MIKAMI, Naoki
//------------------------------------------------------------
#include "AQM1602.hpp"
using namespace Mikami;
-Aqm1602 lcd_; // Default, OK
-//Aqm1602 lcd_(D14, D15); // OK
-//Aqm1602 lcd_(D14, D15, 200000); // OK
-//Aqm1602 lcd_(D14, D15, 200000, true, true); // OK
-//Aqm1602 lcd_(PB_3, PB_10); // OK
-//Aqm1602 lcd_(PC_9, PA_8); // OK
-//Aqm1602 lcd_(PB_4, PA_8); // OK
+Aqm1602 lcd_; // Default, OK
+//Aqm1602 lcd_(D14, D15); // OK
+//Aqm1602 lcd_(D14, D15, 200000); // OK
+//Aqm1602 lcd_(D14, D15, 200000, true, true); // OK
+//Aqm1602 lcd_(PB_3, PB_10); // OK
+//Aqm1602 lcd_(PC_9, PA_8); // OK
+//Aqm1602 lcd_(PB_4, PA_8); // OK
+//I2C i2cObj_(D14, D15);
+//Aqm1602 lcd_(i2cObj_); // OK
+
+// Following: for LPC1114
+//Aqm1602 lcd_(dp5, dp27); // OK
+//I2C i2cObj_(dp5, dp27);
+//Aqm1602 lcd_(i2cObj_); // OK
+
+// Following: for LPC1768
+//Aqm1602 lcd_(p9, p10); // OK
Ticker timer_;
+#if defined(STM32F4) || defined(STM32L0) || defined(__STM32F3xx_H)
DigitalIn uButton_(USER_BUTTON);
+#endif
// Display 0, 1, 2, .....
void TimerIsr()
@@ -31,7 +43,11 @@
void WaitButton()
{
lcd_.WriteStringXY("Push blue button", 0, 1);
+#if defined(STM32F4) || defined(STM32L0) || defined(__STM32F3xx_H)
while (uButton_ == 1) {}
+#else
+ wait(2);
+#endif
lcd_.ClearLine(1);
wait(0.5);
}
@@ -55,4 +71,3 @@
while (true) {}
}
-