olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.16k stars 1.05k forks source link

dht22 with arduino and iic12864 from ali #2193

Open Nemo79 opened 1 year ago

Nemo79 commented 1 year ago

hello, I have a problem with arduino nano and i2c display from ali. I connected and programmed the temperature and humidity meter according to the following scheme and it does not work. Everything is ok for 15 minutes, but then it starts mirroring the text on the LCD. any advice what's wrong?

code: https://pastebin.com/xTHv5tVG

Schematic_dht22-logger-i2c_2023-06-01

LCD GM12864-59N

olikraus commented 1 year ago

Your display a 3.3V display, so the I2C bus also has to have a 3.3V high level which is not the case according to your schematic. The DHT22 might also work with 3.3V, so maybe changing the +5V power rail for the attached devices to 3.3V might work already.

Nemo79 commented 1 year ago

maybe there is an issue, but on the back side of LCD is written 3-5V. I will add a voltage divider for the first approximation.

olikraus commented 1 year ago

I will add a voltage divider for the first approximation.

The voltage divider may not provide the required current. You could just use the 3.3V output of the Arduino Nano instead.

Nemo79 commented 1 year ago

hi Oliver, the issue was caused by death or crashed i2c bus on first Arduino. I change arduino nano board to a new unboxed Arduino nano and it works for two hours without a problem

Nemo79 commented 1 year ago

now i am thinking how to add sd card and logging temperature and humidity

olikraus commented 1 year ago

now i am thinking how to add sd card and logging temperature and humidity

In the same I2C bus? Be aware, that Arduino Wire doesn't has a concept to allow multiple I2C devices with different configuration requirements. U8g2 is already kind of smart here, but other libs may not.

mikcip commented 1 year ago

Keresek egy kódot, ami megjeleníti a GM12864-59N LCD kijelzőn a HELLO szöveget.