Lets get the party started and +1
[url=https://www.banggood.com/custlink/KvGGhGF4wG[/url]
I like ESP8266 and ESP8285 and ESP32
Explore... Chat... Share...
-- PCF8574
-- P7 P6 P5 P4 P3 P2 P1 P0
-- D7 D6 D5 D4 (BL) EN RW RS
-- HD44780
id = 0
sda = 4 -- GPIO2
scl = 5 -- GPIO14
dev = 0x27 -- PCF8574
reg = 0x4e -- write
i2c.setup(id, sda, scl, i2c.SLOW)
function send(data)
local bl = 0x00 -- 0x08 = back light on
local value = {}
for i = 1, #data do
table.insert(value, data[i] + bl + 0x04 + rs)
table.insert(value, data[i] + bl + rs) -- fall edge to write
end
i2c.start(id)
i2c.address(id, dev ,i2c.TRANSMITTER)
i2c.write(id, reg, value)
i2c.stop(id)
end
-- init
rs = 0
send({0x30})
tmr.delay(4100)
send({0x30})
tmr.delay(100)
send({0x30})
send({0x20, 0x20, 0x80}) -- 4 bit, 2 line
send({0x00, 0x10}) -- display clear
send({0x00, 0xf0}) -- display on
nibble = {
["0"] = 0x00,
["1"] = 0x10,
["2"] = 0x20,
["3"] = 0x30,
["4"] = 0x40,
["5"] = 0x50,
["6"] = 0x60,
["7"] = 0x70,
["8"] = 0x80,
["9"] = 0x90,
["a"] = 0xa0,
["b"] = 0xb0,
["c"] = 0xc0,
["d"] = 0xd0,
["e"] = 0xe0,
["f"] = 0xf0
}
rs = 1
str = "Hello World!"
for i = 1, #str do
local char = string.byte(string.sub(str, i, i))
send({
nibble[string.sub(string.format("%x", char), 1, -2)],
nibble[string.sub(string.format("%x", char), 2)]
})
end
alonewolfx2 wrote:Finally i found Zarya's hd44780 driver and i modified for 16x2 lcd. its working now and here is video.
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]