Daichi Arai / AQM1602_simple

Dependents:   AQM1602_NITK

Homepage

include the mbed library with this snippet

//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();                      //全消去
}


All wikipages