I uploaded the Blink sketch (from the ESP8266 examples, in the Arduino IDE) successfully.
Depending on which wire configuration I am using two different things happen:
wiring 1
:
CH_PD -> 3.3V
VCC -> 3.3V
RST -> GND
GPI02 -> LED
GND -> GND
wiring 2
:
VCC -> 3.3V
RST -> GND
GPI02 -> LED
GND -> GND
There are TX/RX lines in the picture from when I was flashing - they aren't being used for running the sketch.
With wiring 1
the LED stays on (doesn't blink) - I was wondering if this was because I still had the VCC -> 3.3V connected. So I disconnected that, which gives way to wiring 2
.
With wiring 2
the LED doesn't come on at all, it is the same as wiring 1
except without VCC -> 3.3V.
Why is it constant when 3.3V is going to VCC, and constantly off when I disconnect it? Why doesn't it blink using wiring 2
?
UPDATE
A diagram as requested, sorry it was my first time doing this:
Code:
/*
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 acive 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)
}