My hardware design has 1 USB-TTL module, and it connect directly from computer to Arduino Promini.
And my hardware design also has 1 ESP8266 with TX and RX pin connect to pin 2(Arduino Promini's SoftwareSerial RX) and pin 3(Arduino Promini's SoftwareSerial TX) on Arduino Promini.
So to upload new firmware to esp8266 I using the code below.
void setup() {
// put your setup code here, to run once:
pinMode(2, INPUT_PULLUP);
pinMode(3, OUTPUT);
pinMode(0, INPUT_PULLUP);
pinMode(1, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(3, digitalRead(0));
digitalWrite(1, digitalRead(2));
}
I have pull the GPIO0 to GND
But it doesn't work !!!
I have tried to upload this code to ESP8266
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available() > 0)
{
Serial.write(Serial.read());
}
}
With this code I can communicate bettween computer and ESP8266 correctly !!!
This make me confused. Why I can communicate computer and ESP8266 via Arduino Promini but I can't upload ESP8266 via Arduino Promini
To communicate 'yes' but to upload using serial-pass-through 'no'. what is the BAUD-rate for flashing firmware to an ESP. usually 115200, swSerial can not really support that. You will have a better chance uploading a sketch to the promini keeping all pins as input, and then connecting the TX(ESP)->RX(USB) & RX(ESP)->TX(USB) hardware wise. Or in general "Don't solder your boards together if you still need to upload stuff"
Deva_Rishi:
To communicate 'yes' but to upload using serial-pass-through 'no'. what is the BAUD-rate for flashing firmware to an ESP. usually 115200, swSerial can not really support that. You will have a better chance uploading a sketch to the promini keeping all pins as input, and then connecting the TX(ESP)->RX(USB) & RX(ESP)->TX(USB) hardware wise. Or in general "Don't solder your boards together if you still need to upload stuff"
Yes the SerialPassthrough must be modified for SoftwareSerial., but the esp8266 can upload at any speed and has baud rate auto detection in bootloader. So 9600 baud can be used.
Deva_Rishi, read my thread about EspProxy. Or even better try it. With boards like Uno WiFi (old or new), this tricks are good to know.