Hey guys, i am really new to this and i got a kindle book (ESP32 Development using the Arduino IDE) and one of the example is trying to create a web server to flash an LED. My problem is that my board seems to not want to connect to my WiFi? I’m not really sure what to do here, anyone could help?
// Replace with your network credentials
const char* ssid = "My_ssid";
const char* password = "My_password";
const int led = 32; // the number of the LED pin
// Client variables
// initialize the LED as an output:
//Initialize serial and wait for port to open:
// We start by connecting to a WiFi network
Serial.print("Connecting to ");
// attempt to connect to Wifi network:
while(WiFi.status() != WL_CONNECTED)
// Connect to WPA/WPA2 network.
Serial.println("IP address: ");
On the monitor it just shows “Connecting to: ssid” with the dots at the bottom from the delay of the “// Connect to WPA/WPA2 network.” I’ve replace the My_ssid, My_password and router_ip with my own.
Yes, at the end of setup(). Then it should print scan start and after a short while the networks should be listed. No output? Have you change it to 9600 baud? (or add monitor_speed = 115200 if you use 115200 as in the original sketch).
Are these not the same? The router should advertise its WiFi network always under the same name (=SSID).
Were there any errors uploading? Pressing the reset button on the board has no effect? Trying a different baud rate neither? There has to be atleast some output from the bootloader after reset at 115200 baud. For my board the sketch works with the platformio.ini
Oh that might be the problem then, good ole apple doesn’t seem to want to make it easy on us so i have to use a usb-c adaptor to put in a usb to micro-usb in order to plug in my device. I even tried it in the arduino IDE and still nothing.
Usually seeing corruption like ��� points to a power supply issue, like a bad or long USB cable with high losses or the source (like a USB hub) not being able to provide the peak current when the ESP32 turns on its WiFi radio… But if you’re already plugged into your computer’s main USB port (and especially it’s Type-C so it can power quite a bit…) that doesn’t seem likely… Maybe just a different microUSB cable helps?
At least the output is consistent with Arduino IDE here
Hi there, My esp32 couldn’t also connect to my modem.
After debugging I noticed i was using the WiFi esp3866 library instead of the esp32 library.
After changing to the correct library; Everything worked!
I hope that I have helped.
I basically have the same problem. I have a node MCU 32 that I cannot get to connect to Wi-Fi. I used the sample code above and all I get is a number one status. I ran a different set of code that displays all of the Wi-Fi networks and the one I need to connect to is listed so I know the board can see him. I have the correct password but I can’t connect.