WiFi basics
On Inkplate 5V2, WiFi is handled by the onboard ESP32 processor. These pages show you how to use it for WiFi in your own projects.
Connecting to WiFi
Here are the basic steps for connecting to WiFi, with the key functions explained below:
#include "Inkplate.h"
#include <WiFi.h>
const char* ssid="yourssid";
const char* pass="yourpassword";
Inkplate inkplate(INKPLATE_1BIT);
void setup(){
inkplate.begin();
inkplate.clearDisplay();
inkplate.display();
Serial.begin(115200);
WiFi.begin(ssid, pass);
inkplate.print("Connecting to WiFi...");
while(WiFi.status()!=WL_CONNECTED){
delay(500);
inkplate.print('.');
inkplate.partialUpdate();
delay(1000);
}
inkplate.println("\nSuccessfully connected to WiFi");
inkplate.display();
}
void loop(){}
WiFi.begin()
Starts connecting to a WiFi access point using the specified SSID and password.
Returns type: wl_status_t
Returns value: Returns wl_status_t enum value
Function parameters:
| Type | Name | Description |
|---|---|---|
const char* | ssid | Network SSID (the access point name). |
const char* | passphrase | Network password. Optional, depending on the network's security. |
WiFi.status()
Returns the current connection status of the ESP32 WiFi radio. Compare it against WL_CONNECTED to check whether the board is online.
Returns type: wl_status_t
Returns value: Returns wl_status_t enum value
Full example
For more details, have a look at the full examples:
Inkplate 5V2 WiFi examples
Inkplate 5V2 WiFi examples from the Inkplate library