Skip to main content

WiFi basics

On Inkplate 6, WiFi is handled by the onboard ESP32 processor. These pages contain tutorials on how to use this processor to implement WiFi in your projects.


Connecting to WiFi

These are the basic steps to connecting to WiFi, followed by explanations of the key functions:

#include "Inkplate.h"
#include <WiFi.h>
const char* ssid="yourssid";
const char* pass="yourpassword";
Inkplate display(INKPLATE_1BIT);
void setup(){
display.begin();
display.clearDisplay();
display.display();
Serial.begin(115200);
WiFi.begin(ssid, pass);
display.print("Connecting to WiFi...");
while(WiFi.status()!=WL_CONNECTED){
delay(500);
display.print('.');
display.partialUpdate(true);
delay(1000);
}
display.println("\nSuccessfully connected to WiFi");
display.display();
}
void loop(){}

WiFi.begin()

Starts connecting to a WiFi access point using the specified SSID and password. This is the standard ESP32 Arduino WiFi function, so the connection runs on the same ESP32 that runs your sketch.

Returns type: wl_status_t

Returns value: The connection status at the moment the call returns. Poll WiFi.status() until it reports WL_CONNECTED.

Function parameters:

TypeNameDescription
const char*ssidThe SSID (AP name) to connect to.
const char*passphraseThe AP password. Optional, depending on the network's security. Maximum length is 63 characters.

WiFi.status()

Reports the current state of the ESP32 WiFi connection. Compare the result against WL_CONNECTED to check whether the board has joined the access point.

Returns type: wl_status_t

Returns value: A status constant such as WL_IDLE_STATUS, WL_CONNECTED, WL_CONNECT_FAILED or WL_DISCONNECTED.


Full example

To see more details, check out our full examples:

Inkplate 6 WiFi examples

Inkplate 6 WiFi examples from the Inkplate library