Arduino, ESP and i2c devices
Versione del 27 giu 2016 alle 10:01 di Renzo (discussione | contributi) (Creata pagina con 'This project permits to control a remote LCD display connected via an i2c port expander via Wifi. I have successfully tested this program on an ESP-12 (ESP8266) using the Ard...')
This project permits to control a remote LCD display connected via an i2c port expander via Wifi.
I have successfully tested this program on an ESP-12 (ESP8266) using the Arduino IDE.
hardware
The hardware "ingredients" needed for this experiments are:
- a ESP8266 (in the example it is a ESP12).
- an lcd-plug by jeelabs including the display
- A "console cable" (but any USB to TTL converter is okay).
wiring
i2c: SDA is GP04, SCL is GP05. The pins of jeelabs' lcd plug (this cabling works for all i2c based jeelabs' plugs):
- P -> +5V or disconnected (unused for lcd-plug)
- D -> GP04 (SDA)
- G -> GND
- + -> +3V3
- A -> GP05 (SCL)
- I -> NC (unused for lcd-plug, can be connected to another GPIO for other boards providing useful interrupts).
Console cable: using an Adafruit like cable:
- Black -> GROUND
- While -> TXD on ESP
- Green -> RXD on ESP
DO NOT CONNECT THE RED PIN TO YOUR ESP! The red pin is +5V while ESP need +3V3 so either you have a step-down circuit to convert 5V to 3.3V or you'll need another power source of the right voltage for yout ESP.
Software
Here is the source code. <source lang=C>