wemosで16字2行LCD
概要
wemod d1で16字2行LCDやってみた。
写真
接続
i2cなので、SDAとSCLをつなぎます。
アドレスは、0x27です。
サンプルコード
#include <Wire.h>
#include "Lcd8574.h"
Lcd8574 lcd;
int i = 0;
void setup()
{
pinMode(2, OUTPUT);
lcd = Lcd8574();
lcd.begin(16, 2);
lcd.print("012hello, world!");
}
void loop()
{
i++;
lcd.setCursor(1, 0);
lcd.print(i);
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
ライブラリー
#include <Wire.h>
#include "Lcd8574.h"
Lcd8574 lcd;
int i = 0;
void setup()
{
pinMode(2, OUTPUT);
lcd = Lcd8574();
lcd.begin(16, 2);
lcd.print("012hello, world!");
}
void loop()
{
i++;
lcd.setCursor(1, 0);
lcd.print(i);
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
以上。
Author And Source
この問題について(wemosで16字2行LCD), 我々は、より多くの情報をここで見つけました https://qiita.com/ohisama@github/items/8b7e95aa3a3b99997be9著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .