Set WiFi to station mode and disconnect from an AP if it was previously connected The most obvious difference being the different file you need to include: The API is almost the same as with the WiFi Shield library, This sketch demonstrates how to scan WiFi networks. In the Arduino IDE ESP8266WiFi examples, i found this sketch called WiFiScan, which i think is a simple way to test the WiFi on my ESP-01: /* (which is also the TXD pin so we cannot use Serial.print() at the same time) The blue LED on the ESP-01 module is connected to GPIO1 I was trying to change the timing of the LED blinking and also output text in the Serial Monitor so i think that maybe this was causing a clash and messing up the LED blinking. I found this info in the BlinkWithoutDelay sketch example for ESP8266 in Arduino IDE and i think it might explain why the built-in LED blinking is not working as it should. ![]() Just from a high level, it seems the new program did not load and the old one is still running. "But the ESP-01 built-in blue LED is still blinking at the same rate, even after i increased the delay from 500 to 1000 and then to 2000 ms." ![]() So, until now, i have only been able to blink the built-in LED and also an LED connected to GPIO_2. But i have not been able to find a station mode or sketch in the examples to try out the WiFi capabilities of the ESP-01. From what i read, the ESP8266 should be set as a station. I have tried a few of basic ESP8266 examples in Arduino IDE, but i'm not sure which one would allow me to connect to my local WiFi network. Here is a photo comparison: Variants of the ("new") black ESP01 1MB - Everything ESP8266 I have the ESP-01 black model with 1 MB flash. I tried with pin 0 and 2, but the built-in LED didn't work. ![]() I think the built-in LED pin depends on the ESP-01 model. if there was a WiFi network configured before (maybe with AT firmware) it attempts to connect The timing is irregular because it handles the WiFi startup. So, it works and i reset the ESP-01 by plugging its reset jumper wire to ground, but i have no idea why it does not display at the configured baud rate of 115200 in the sketch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |