Software Reference Manual 10.1.1
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
EXT4_Zigbee_Weather.ino File Reference

Example for EXT4 extension board sensors and actuators - All editions. More...

#include "PDLS_Common.h"
#include "Pervasive_Wide_Small.h"
#include "PDLS_Basic.h"
#include <Zigbee.h>
#include <ZigbeeTemperatureSensor.h>
#include <ZigbeeHumiditySensor.h>
#include "Wire.h"
#include "qrcode.h"
Include dependency graph for EXT4_Zigbee_Weather.ino:

Classes

struct  measure_s

Functions

void displayAbout ()
 Display the About page.
void displayQR (const char *code)
 Display the QR-code.
bool displayValue (uint8_t slot, STRING_CONST_TYPE name, measure_s *value, STRING_CONST_TYPE unit)
 Manage and display the measure.
uint8_t menuOneButton (uint8_t button, const char *title, const char *option1, const char *option2=0, const char *option3=0, const char *option4=0)
 Display a menu managed by a single button.
void displayCommissioning ()
 Display the commission process.
void displayDecommissioning ()
 Display the decommission process.
void displayIdenfication ()
 Display the identification.
void setup ()
 Setup.
void loop ()
 Loop.

Detailed Description

Example for EXT4 extension board sensors and actuators - All editions.

Based on Zigbee multiple sensor example

The example shows how to create multiple sensor instances with the Arduino Zigbee API.

The example creates a Zigbee temperature sensor device and publishes the current CPU temperature through it. The device has to be commissioned to a Zigbee network first. Open your Zigbee coordinator (e.g. Home Assistant with ZHA or Zigbee2MQTT) and put it in pairing mode.

Compatible boards:

  • Arduino Nano Matter
  • Silicon Labs xG24 Explorer Kit
  • SparkFun Thing Plus Matter
  • Seeed Studio XIAO MG24 (Sense)
Author
Tamas Jozsi (Silicon Labs)
Date
21 Oct 2026
Version
1011

Function Documentation

◆ displayAbout()

void displayAbout ( )

Display the About page.

See also
https://www.pervasivedisplays.com

◆ displayQR()

void displayQR ( const char * code)

Display the QR-code.

Display QR-code.

Parameters
codetext
See also
https://github.com/ricmoo/qrcode/
Parameters
codetext

◆ displayValue()

bool displayValue ( uint8_t slot,
STRING_CONST_TYPE name,
measure_s * value,
STRING_CONST_TYPE unit )

Manage and display the measure.

Parameters
slot0 or 1
namename of the measure
valuemeasure as measure_s structure
unittext of the unit
Returns
true if different value
Note
  • value rounded to one decimal
  • min and max values updated
  • old value updated

◆ menuOneButton()

uint8_t menuOneButton ( uint8_t button,
const char * title,
const char * option1,
const char * option2 = 0,
const char * option3 = 0,
const char * option4 = 0 )

Display a menu managed by a single button.

Parameters
buttonGPIO of the button
titletext for title
option1text for option 1, required
option2text for option 2, optional
option3text for option 3, optional
option4text for option 4, optional
Returns
number of the selected option, 0 = none
Note
Procedure
  • Press and hold the button to choose the option
  • A progress bar shows the selected option
  • Release the button to select the option
Warning
button should be initialised before calling menuOneButton()