So here is my problem : I have a LCD screen with an arduino library : LiquidCrystal - Arduino Reference
I am using the ESP8266 as the controller, and I would like to write something directly from the ESP8266. Do you know how can I do ?
There is also another option : I use my ESP8266 to receive a message, but I also use my arduino just to put the 3.3V for my ESP8266. I may send my message to my arduino and show it from the arduino, but I don't know if it is possible...
In the time I had no answer, I tried to use it via the arduino, but I could not have an answer with the "AT" command for the moment... The ESP8266 worked well as a wifi receiver alone though. I thought about connecting the TX of the ESP8266 to a digit input of my arduino to send the message it receives from the internet, but I am not quite sure of how it work for the moment...
I try to read some documentations, waiting for you answer
Ro0ob:
I found a lot of library for LCD with an I2C, but I would like to do without it.
The ESP8266 is a powerful and capable processor with built-in WiFi capability that is programmable via the Arduino IDE. But, it is GPIO-limited. If you want to use an LCD display, I2C is the way to go. I've used this one successfully even though the pinout is "Arduino-like":
Since the ESP is a 3.3V device, you'll need a level shifter like this one:
Gfvalvo may be correct. The LCD is an old design and will not run at 3.3V. it needs 5V. It's inputs may or may not respond to the 3.3V signals from the esp pins. You can try, but if it does not respond, you will need to use level shifters on all 6 pins connected to the esp.
This may mean that it is simpler to use an i2c backpack. The backpack will also run at 5V, but it's i2c inputs will respond to the 3.3V i2c signals from the esp (I have tested that with my backpacks).
So I understand why a i2c is mandatory.
One last question, by curiosity : is it possible to make the ESP8266 run by itself and send the text by linking a GPIO to an output of the Arduino ?
Not mandatory, no. You could try with and without level shifters. But that will leave you with very few available pins on the esp.
Ro0ob:
One last question, by curiosity : is it possible to make the ESP8266 run by itself and send the text by linking a GPIO to an output of the Arduino ?
Please explain in more detail. Perhaps a diagram. My first reaction is that if you connect an output of the esp to an output of an Arduino, there will be a damaging short-circuit. One of those pins must be an input, not an output!
There are at least 3 issues here that you are confounding / confusing sufficiently to make your intentions unclear:
Do you understand that the ESP8266 is a processor that generally comes pre-programmed to respond to AT commands and act as a WiFi modem? So, if you do nothing, that's how it will behave.
However, it's also a general-purpose processor that can be programmed via the Arduino IDE. Once you do that, its functionality is determined by the code you load into it. You can also "re-flash" it back to acting like a WiFi modem.
The ESP8266 is GPIO-limited. Driving an LCD display requires on the order of 6 pins. That's a lot on an ESP. I don't understand why you would want to connect it that way.
However, if you do, then you need to consider voltage levels. If the LCD is a 5V device that means it needs a Vss=5V power supply. Its digital inputs may or may not accept 3.3V logic. Check the documentation. If they do, connect them directly to the ESP. If the documentation says the device needs 5V logic inputs, it might still "work" with 3.3V. But, that's poor engineering practice. Use a level shifter.
The sensible thing to do is use an LCD with an I2C (or maybe SPI) interface. The same supply voltage / logic level concerns stated above still apply. If the I2C interface is 5V, don't connect it directly to the ESP as that will cause damage. Use a bidirectional level shifter like the one I linked in Reply #4.
gfvalvo:
If the I2C interface is 5V, don't connect it directly to the ESP as that will cause damage.
True, but... if the i2c adaptor does not have on-board pull-up resistors to 5V, you can use external pull-up resistors to 3.3V instead. If the adaptor can accept the 3.3V i2c signals, you don't need the level shifters. But that's 2 big ifs. The adaptors I have appear to have pull-ups to the Vcc pin, which must be 5V for the display to operate.
What I have done is use a pfc8574 chip to build my own i2c interface between an esp and a 128x64 glcd. The pcf chip was powered by 5V so that its output signals would be accepted by the display. But it was still happy to accept 3.3V i2c signals from the esp.
PaulRB:
.Please explain in more detail. Perhaps a diagram. My first reaction is that if you connect an output of the esp to an output of an Arduino, there will be a damaging short-circuit. One of those pins must be an input, not an output!
Not an output of course, I switch my words I mean an input.
Here is the thing I was thinking about. In my diagram, the ESP8266 will work alone with a code like this, that I try and already made it work :
In that way, I don't have to buy an i2c, I can power my ESP8266 using the 3.3v output of the arduino, and I can use the arduino to show the text and also to do other things (like if you receive a text, light up a LED or something).
I guess you can do it only using the ESP8266 with the i2c, but as you can see I am a beginner and it is hard to me to work with the ESP8266, I understand way better the arduino.
So my question was : is it possible to do as I though ? Sending the text from the ESP to the arduino ?
Do you understand that the ESP8266 is a processor that generally comes pre-programmed to respond to AT commands and act as a WiFi modem? So, if you do nothing, that's how it will behave.
However, it's also a general-purpose processor that can be programmed via the Arduino IDE. Once you do that, its functionality is determined by the code you load into it. You can also "re-flash" it back to acting like a WiFi modem.
As I already upload the code above on my ESP8266, that is why it doesn't work when I try to use the AT command. It means that I have to re-flahs my ESP8266 if I want to use it as a wifi modem ?