I am trying to write a little bit bang code to send uart data out some io pins.
Everytime I load it it spits out wifi connection status out uart, after the garbage data of course.
So I am a bit concerned that this thing is running more than just the code I am trying to upload. Is there some way to erase the flash and only run the code I upload. I just want some minimal code for testing then add in wifi stuff later.
I have noticed that it only does this when I init the serial port. And it sends out the debug info from there server demo sketch. I am wondering why that code is running when I don't load that sketched. I removed all the extra code and found that this little code below shows the problem.
CODE:
void setup() {
pinMode(5,OUTPUT); //Pin24 GPIO5
Serial.begin(115200);
}
void loop()
{
digitalWrite(5, LOW); // Turn LED OFF
delay(1000);
digitalWrite(5, HIGH); // Turn LED ON
delay(1000);
}
So when i run that I get the following out the uart I purposely messed up my router info in the server sketch and uploaded it to the esp before uploading this sketch to confirm it was any of the demo sketches.
Garbage data would not paste into here but here is the rest.
no HOME-D811 found, reconnect after 1s
reconnect
f 0, scandone
no HOME-D811 found, reconnect after 1s
reconnect
f -180, scandone
I am using
Sparkfun Think dev board
I am using Arduino1.6.5
http://arduino.esp8266.com/versions/2.1 ... index.json
If anyone has a similar issue I would be interested to know if there is a work around.
Is there an erase flash option or something so that now old sketches are running? It looks like the wifi config part of the binary does not get erased properly when running minimal sketches for some reason.
Thanks