前回上手く表示できるようになったので、少しソースを変えて使い易くした。
はい、これで液晶表示できるようになりました。
今回できた事 I2Cの書き込み。
import pigpio
import time
addr = 0x3e
_command=0x00
_data=0x40
_clear=0x01
_home=0x02
display_On=0x0f
LCD_2ndline=0x40+0x80
pi = pigpio.pi()
h = pi.i2c_open(1,addr)
pi.i2c_write_byte_data(h, _command, 0x38)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, 0x39)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, 0x14)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, 0x73)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, 0x56)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, 0x6c)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, _home)
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, _clear)
time.sleep(0.2)
# pi.i2c_write_byte_data(h, _command, display_On)
# time.sleep(0.2)
for c in 'PS 5!':
pi.i2c_write_byte_data(h, _data, ord(c))
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, LCD_2ndline)
for aa in 'Hoshiina!':
pi.i2c_write_byte_data(h, _data, ord(aa))
time.sleep(0.2)
pi.i2c_write_byte_data(h, _command, 0x0c)