Hi! i cant figure out what i have done wrong or how to fix it??
It says: exit status 1
'printWifiStatus' was not declared in this scope. And i think it could be something with the library but i have installed both Softwareserial and WiFiesp and it still doesnt work...
What is wrong??
Code:
//include softwareserial and Wifi library
#include <SoftwareSerial.h>
#include <WiFiEsp.h>
#include <WiFiEspClient.h>
#include <WiFiEspServer.h>
#include <WiFiEspUdp.h>
//Create WiFi moduleobject in gpio pin 6 (RX) and 7 (TX)
SoftwareSerial Serial1(6, 7);
//Declare and intialise global arrays for Wifi settings
char ssid[] = "Kius";
char pass[] = "12345678";
//Declare and initialise variable for radio status
int status = WL_IDLE_STATUS;
void setup() {
// Initialize serial for debugging
Serial.begin(115200);
// Initialize serial for ESP module
Serial1.begin(9600);
//initialize ESP Module
WiFi.init(&Serial1);
// Check for presence of the shield
if (WiFi.status() == WL_NO_SHIELD) {
Serial.print("WiFi shield not present");
//don“t continue
while (true);
}
// Attempt to connect to WiFi network
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network
status = WiFi.begin(ssid, pass);
}
Serial.println("You're connected to the network");
printWifiStatus();
}
void loop()
void printWiFiStatus() {
//Print the ssid of the network
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
//Print the Ip address
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
}
Did i post the code right? (first time on this forum) ![]()