This project leverages the Pervasive Displays EPDK-Matter but uses instead the Arduino Nano ESP32 with WiFi connectivity. It relies on the Arduino Cloud for both the development of the software and the management of the device.
HardwareThe Pervasive Displays Development Kit for Matter (EPDK-Matter) packs an EXT4 extension board, a 2.90" e-paper display and an adapter board, plus accessories. Initially designed for the Arduino Nano Matter board, It can also be used with other members of the Arduino Nano family.
Here, we are using the Arduino Nano ESP32 powered by the u-blox NORA-W106 module based on the Espressif ESP32-S3. It brings WiFi and Bluetooth connectivity.
The adapter board provides a fast and secure connection of the Arduino Nano ESP32 board to the EXT4 extension board.
SoftwareThe PDLS_EXT4_Basic_Matter library is part of the Pervasive Displays Library Suite and is available as an open-source GitHub repository.
The documentation includes a technical wiki, a user guide and a reference manual.
Development
The development is done entirely with the Arduino IoT Cloud application.
The left pane provides different pages for each step: Devices, Things, Sketches and Dashboards.
Device
The device refers to the physical object.
Once the Arduino Nano ESP32 is connected to the PC through USB, the Arduino IoT Cloud application displays two keys: the Device ID and the Secret Key, to be noted or saved very carefully.
On the Device page, press the Add button to add and name it.
Thing
A thing associates variables to a device connected to a network.
On the Thing page, create the variables used by the project.
Configure the network the board is connected to.
Sketch
The Arduino IoT Cloud application generates a project with four files:
Main sketch
The main sketch .ino
contains the code of the application.
It is highly modular, with dedicated sections for each part.
- IoT, including the functions which are called when the values they managed are changed from the Dashboard.
- Text management, up to 4 messages,
- Screen, initialisation and refresh,
- Temperature and relative humidity sensor,
- RGB LED.
ReadMe
The Markdown-like ReadMe.adoc
includes the typical read-me instructions.
Thing properties
The thingProperties.h
header file lists the variables defined earlier. It also includes functions for the variables marked as `READ/WRITE`. Those functions are called when the Dashboard changes the values they manage.
Sketch Secret
The Sketch Secret
file includes protected constants, such as the SSID name and password, the Secret Key of the device.
Although not directly used, it is a good idea to add the Device ID to the `Sketch Secret` and the corresponding constant declaration on the `thingProperties.h` header file.
The library PDLS_EXT4_Basic_Matter manages the screen.
To include it, click on the library icon, search for ext4
, select it and install it.
The project also uses the library Adafruit NeoPixel to drive the RGB LED. To install it, follow the same procedure.
The pins naming uses the legacy scheme, by GPIO number
. If the default by Arduino pin
is selected, a compilation error is raised. This is a requirement of the Adafruit NeoPixel library.
Dashboard
On the Dashboard page, add the widgets.
For each widget, associate the corresponding variable as defined at the step related to the Thing.
Once everything is ready, press Verify then Upload. The compilation process is rather slow.
The free edition of the Arduino Cloud solution does not bring over-the-air (OTA) upload, so the Arduino Nano ESP32 board needs to be connected to a Serial port.
Connect to the dashboard, read the temperature and humidity, send a message, set the colour of the LED and turn it on and off!
The Serial console traces the different events.
The free edition of the Arduino Cloud solution offers everything needed to design, develop and implement an IoT project.
The advanced integration with Arduino hardware, the extensive documentation, the safe connection of the Development Kit for Matter (EPDK-Matter), the availability of the dedicated PDLS_EXT4_Basic_Matter, all those ingredients make a perfect match for advanced IoT projects.
Comments
Please log in or sign up to comment.