I've been trying to to force my ESP8266 to work with different l2C displays for the last 5 hours, but I was unsuccessful and need someone's help.
My setup is super simple:
Controller:
LoLin NodeMcu Lua ESP8266 CH340G WIFI Internet Development Board Module
Display:
Kuman 0.96 Inch I2c 128x64 LCD Display
The display has 4 pins: GND, VCC, SCL, SDA. That are connected to the controller like so:
GND -> G
VCC -> V3
SCL -> D1 (GPIO 05)
SDA -> D2 (GPIO 04)
I have also tried this setup as described in this post, but the results were even worse. I could not get the device detected at all.
GND -> GND
VCC -> Vin
SCL -> D1 (GPIO 05)
SDA -> D2 (GPIO 04)
The issue
Here is the code that I've been using. It works both with Arduino Nano and my ESP8266 controller. But ESP8266 seems to have problems:
- It detects the address of the device only the first time
- It does not display anything. the screen is completely blank
More information:
- I have tried other L2C displays. the result is the same. Arduino Nano works perfectly fine while my wifi-enabled controller either does not recognize displays at all or shows them briefly the first time I press reset
- Obviously, when I connect i2C display to Nano I use different pins.
Arduino Nano. Works perfectly with the display:
NodeMcu Lua ESP8266. Only finds the display the first time after I press Reset button on the controller.
NodeMcu Lua ESP8266:
Arduino nano:
Update:
I have also tried connecting the display to a separate 3.3V source with a common ground with the wifi-enabled controller. The result is the same. So it's not the problem with the power supply...
Update 2:
There is also a message from this website (NodeMCU ESP-12E ESP8266 WiFi Lua IoT CH340G V3 - dipmicro electronics):
"You need to power the board with external power supply. I used 5V/GND from Arduino powered by 12V/1A adapter on VIN/G on NodeMCU bottom left (USB facing down) - because that is what I had readily available on my desk when testing a batch of samples. Some units may work without external power, other may not even come up as serial port, some may cycle between serial port apearing and disapearing. NodeMCU does not have large power draw, but power surges from it's own working are most likely reseting the device. Some poeple have had success installing additional electrolytic capacitor on the device."
So I went ahead and did as this message suggested. I've connected my Arduino Uno to 12V DC source and used it's 5V output to power NodeMCU via Vin. The result is - no luck. I don't see any difference. The display still does not show anything.
Update 3:
This photo shows the Voltage and currency I'm getting from my Laptops' USB 3.0:
Update 4:
When I connect a different I2C display, it behaves the same way: the address is detected the first time and then nothing happens:
Scanning...
I2C device found at address 0x27 !
Showing stuff...
done
Scanning...
No I2C devices found
Scanning...
No I2C devices found
Any help would be greatly appreciated!