Hey. I am working with ESPS and trying to program them with Arduino UNO with arduino software. I am able to write a program to ESP8266-01 without using any logic shifting - I connect RX to RX and TX to TX directly. When i ground the reset pin while reset the GPI0 i can write the program to ESP8266 but it does not seem to do what it is supposed to.
The code I have used:
/*
ESP8266 Blink by Simon Peter
Blink the blue LED on the ESP-01 module
This example code is in the public domain
The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is active low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
This program should flash an inbuilt BLUE led, but is not doing anything. However the blue LED flashed rapidly when the ESP8266 is being programmed.
When i try to use logic level shifter that I have bought for the purpose the program the ESP8266-01 with arduino, is not working. I am just getting usual memory error:
You also don't need a level shifter for the ESP8266 - The manufacturer has stated (and users confirmed with tests) that the ESP8266 GPIO pins are in fact 5v tolerant.
After uploading the ESP8266 firmware, to have the Uno talk to the ESP8266, you need to change the connections - TX of Uno goes to RX of ESP8266, RX of Uno goes to TX of ESP8266.
You must use an external 3.3v adapter; the one on the Uno does not provide enough current to power the ESP8266 once it tries to start the wireless functionality
DrAzzy:
You also don't need a level shifter for the ESP8266 - The manufacturer has stated (and users confirmed with tests) that the ESP8266 GPIO pins are in fact 5v tolerant.
Where did you get this info? My datasheet says V_IH(max) is 3.6V. Also a FAQ document from their pages says:
Are the GPIO pins 5V compatible?
No, they are not. While many applications may get away by using a resistor voltage divider or series resistor, we highly recommend using a proper logic level converter chip to interface with 5V logic. Not doing so may lead to damage to the ESP8266 in the long run.
DrAzzy:
You also don't need a level shifter for the ESP8266 - The manufacturer has stated (and users confirmed with tests) that the ESP8266 GPIO pins are in fact 5v tolerant.
for upload yes they are, if a pin is set to output, 5v can damage it.
DrAzzy:
You must use an external 3.3v adapter; the one on the Uno does not provide enough current to power the ESP8266 once it tries to start the wireless functionality
I have used the 3.3v from my Uno for upload and wifi connection (AP STA & Both) without any issue.