Hi, I recently uploaded a program to Scan Wifi and my board ESP 32 did this scan succesfully, showing on the serial monitor several networks. However, when I uploaded a sketch which shows the strenght of the WIFI connection, the serial monitor shows a message which clearly reveals that the board is not conneting for some reason I don't know. I apreciatte any suggestion to solve this. THe board is an ESP 32 DOIT DEVKIT V1.
You are losing a lot of potential help because your title is incorrect.
Viz: ESP42 imp.....
I'm assuming this is your "new" code. You omitted the header which is a no-no. (I've corrected a typo RRSI )
/*
Complete details at https://RandomNerdTutorials.com/esp32-useful-wi-fi-functions-arduino/
*/
#include <WiFi.h>
// Replace with your network credentials (STATION)
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
void initWiFi() {
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi ..");
while (WiFi.status() != WL_CONNECTED) {
Serial.print('.');
delay(1000);
}
Serial.println(WiFi.localIP());
}
void setup() {
Serial.begin(115200);
initWiFi();
Serial.print("RSSI: ");
Serial.println(WiFi.RSSI());
}
void loop() {
// put your main code here, to run repeatedly:
}
As its worked before I can only guess you have made an error in entering your WiFi credentials.
Perhaps you have omitted the quote marks, or incorrect capitalisation.
This is what my credentials LOOK LIKE. (I've edited them but yours should look like this.)