adameliemorin
Published © GPL3+

Wifi quality tester

Use your MKR wifi1010 and an lcd screen to monitor your WiFi signal Strength. It even work with and exernal power supply (exernal battery)

BeginnerProtip4,694
Wifi quality tester

Things used in this project

Hardware components

Arduino MKR WiFi 1010
Arduino MKR WiFi 1010
×1
Alphanumeric LCD, 20 x 4
Alphanumeric LCD, 20 x 4
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

ConnectWithWPA_SCREEN_STATE.ino

Arduino
If you want to use a 16x2 lcd just change the addresse line 6 to 0x27,16,2).Dont forget to create a secret arduino files and add it by clicking the little below the magnifying glasses and click new tab and select your secret arduino
#include <SPI.h>
#include <WiFiNINA.h>
#include "arduino_secrets.h"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd (0x27, 20, 4);//change the addresse line 6 to 0x27,16,2) if you have a 16x2 screen

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID;        // your network SSID (name)
char pass[] = SECRET_PASS;    // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;            // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128);  // numeric IP for Google (no DNS)
char server[] = "www.google.com";    // name address for Google (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
WiFiClient client;

void setup() {
  lcd.init();
  lcd.backlight();
  lcd.setCursor (0, 0);

  //Initialize serial and wait for port to open:

 

  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    
    // don't continue
    while (true);
  }

  String fv = WiFi.firmwareVersion();
  if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
    
  }
  // attempt to connect to Wifi network:
  while (status != WL_CONNECTED) {

    lcd.setCursor(0, 0);
    lcd.print("Connecting to:");
    lcd.print(ssid);

    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(1000);
    lcd.clear();
  }
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {

    lcd.print("connected to server");
    delay(3000);
    lcd.clear();
  }
  delay(2000);
}
void loop() {
  // if there are incoming bytes available
  // from the server, read them and print them:
  while (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  lcd.setCursor(0, 0);
  lcd.print("SSID: ");
  lcd.print(WiFi.SSID());

  // print your board's IP address:
  IPAddress ip = WiFi.localIP();

  lcd.setCursor(0, 1);
  lcd.print("IP : ");
  lcd.print(WiFi.localIP());

  // print the received signal strength:
  long rssi = WiFi.RSSI();

  lcd.setCursor(0, 2);
  lcd.print("(RSSI):");
  lcd.print(rssi);
  lcd.print(" dBm");
  // if the server's disconnected, stop the client:
  if (!client.connected()) {
lcd.clear();
    lcd.print("disconnecting from server.");
  }
}

SECRET.ARDUINO.ino

Arduino
Dont forget to create a secret arduino files and add it by clicking the little below the magnifying glasses and click new tab and select your secret arduino
#define SECRET_SSID "your WiFi name"
#define SECRET_PASS "your wifi password"

Credits

adameliemorin
1 project • 1 follower
Contact

Comments

Please log in or sign up to comment.