- Sun Apr 15, 2018 3:38 pm
#75403
Giants wrote:1) I push and hold the reset button
2)I push and hold the program button
3)I relase the reset
4)I relate the program
It's right ?
That is the correct sequence.
I normally have GPIO0 held low with a switch. This way I only have to push the reset switch to put it into bootloader mode.
I use the ESP-12 boards so I often don't need to use GPIO0 and it can often be left low. If I want to reset the module (not do a new load) I then change the switch so the state is high. When a new program is loaded into the ESP module it will execute the code and it does not require a new reset with GPIO0 high.
I looked at the link you provided and the information there looks correct.
SDK = software development kit.
As I said previously I use the Arduino environment. It makes things much simpler to get something working. The Arduino environment allows for different processors to make use of the simpler interface. The ESP8266 has been cleverly adapted to work with the Arduino structure. In many cases the Arduino code is a wrapper of the existing Expressif SDK.
I have not worked with the Expressif SDK so I don't know what is involved to get the ESP8266 to work with it. I chose a simpler approach. (my brain is not as good handling too much complexity anymore
)
I am including a compiled binary file of the following code. Maybe you can try flashing it and see what you get.
(180.74 KiB) Downloaded 221 times
Code: Select all/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/
const int led2 = 2;
bool ledstate = 0;
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
pinMode(led2, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
int sensorValue = analogRead(A0); // read the input on analog pin 0:
Serial.println(sensorValue); // print out the value you read:
delay(1000); // delay in between reads for stability
ledstate = !ledstate;
digitalWrite(led2, ledstate);
}