Skip to content

asukiaaa/ST7032_asukiaaa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ST7032_asukiaaa

A library to control ST7032 on a LiquidCrystal. This library was forked from tomozh/arduino_ST7032.

Install

Arduino IDE

You can install via library manager. Search ST7032 on the library manager

PlatformIO

Add this library to dependencies on platformio.ini.

lib_deps =
  ST7032_asukiaaa

Connection

ST7032 Arduino
VDD 3V3
RES 3V3
SDA* SDA(A4 for Uno)
SCL* SCL(A5 for Uno)
GND GND

*... 10Kohm pull-up is needed.

You can check SDA and SCL for your board on Wire page.

Usage

Hello world

See HelloWorld.

#include <ST7032_asukiaaa.h>

ST7032_asukiaaa lcd;

void setup() {
  lcd.begin(16, 2); // LCD columns and rows.
  lcd.setContrast(40);
  // If lcd become black, reduced value for contrast
  // lcd.setContrast(10);
  lcd.print("hello, world!");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis()/1000);
}

Set slave address

You can specify slave address for a LCD.

ST7032_asukiaaa lcd(0x3E);

Set wire

You can set customized wire.(See setWire)

#if defined(ESP32)
  Wire.begin(25, 26); // SDA, SCL
  lcd.setWire(&Wire);
#endif

See examples to know other usage.

License

MIT

References

About

A library for Arduino to use ST7032 for LCD

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%