秋月で売られている液晶ディスプレイAQM1602をI2Cで駆動させるためのライブラリです。 データシートはしっかりとよんでね。

Dependencies:   mbed AQM1602_simple

main.cpp

Committer:
DaichiArai
Date:
2019-03-05
Revision:
0:4b9972af0152

File content as of revision 0:4b9972af0152:

//mbed(stm32l432kc)で"Hello,world!"を表示させるプログラム

#include "mbed.h"
#include "LCD.h"

I2C i2c(D4,D5);
lcd L(i2c);

int main() {
    //setup()を必ず1回入れる
    L.setup();
    L.print("Hello,world!");        //1段目1文字目に表示
    L.print("NITK.K Robocon",1,2);  //2段目と3文字目に表示
    wait(1);
    L.clear(0,1);                   //2段目を消去
    wait(1);
    L.clear(1,0);                   //1段目を消去
    wait(1);
    L.print("Hello,world!",0,0);
    L.set_cursor(1,0);
    L.print("NITK.K Robocon");
    wait(1);
    L.clear();                      //全消去
}