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_AQM0802_I2C mbed
Diff: main.cpp
- Revision:
- 0:73fa5cabbff2
- Child:
- 1:6845f3af0e77
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Nov 30 06:16:39 2014 +0000 @@ -0,0 +1,39 @@ +//------------------------------------------------------------ +// Test program for LCD AQM0802A using I2C interface +// Pullup resistors for SDA and SCL: 10 kΩ +// 2014/11/30, Copyright (c) 2014 MIKAMI, Naoki +//------------------------------------------------------------ + +#include "mbed.h" +#include "AQM0802A.hpp" +using namespace Mikami; + +Aqm0802A lcd_; // Default, OK +//Aqm0802A lcd_(D14, D15); // OK +//Aqm0802A lcd_(D14, D15, 200000); // OK +//Aqm0802A lcd_(D14, D15, 200000, true, true); // OK +//Aqm0802A lcd_(PB_3, PB_10); // OK +//Aqm0802A lcd_(PC_9, PA_8); // OK +//Aqm0802A lcd_(PB_4, PA_8); // OK + +Ticker timer_; + +// Display 0, 1, 2, ..... +void TimerIsr() +{ + static int k = 0; + char str[10]; + sprintf(str, "%d", k++); + lcd_.WriteStringXY(str, 0, 1); +} + +int main() +{ + lcd_.Clear(); + lcd_.WriteString("Hello!"); + TimerIsr(); + timer_.attach(&TimerIsr, 1); + + while (true) {} +} +