Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
EXT4_Matter_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 "Wire.h"
#include <Matter.h>
#include <MatterTemperature.h>
#include <MatterHumidity.h>
#include "qrcode.h"
Include dependency graph for EXT4_Matter_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 Matter multiple sensor example

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

The example creates a Matter temperature and humidity sensor device and publishes data through them. The device has to be commissioned to a Matter hub first.

Compatible boards:

  • Arduino Nano Matter
  • SparkFun Thing Plus MGM240P
  • xG24 Explorer Kit
  • xG24 Dev Kit
Author
Tamas Jozsi (Silicon Labs)
Rei Vilo
Date
21 Jan 2025
Version
902
  • Basic edition: for hobbyists and for basic usage
    Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
  • Evaluation edition: for professionals or organisations, no commercial usage
    All rights reserved
  • Commercial edition: for professionals or organisations, commercial usage
    All rights reserved

Function Documentation

◆ displayAbout()

void displayAbout ( )

Display the About page.

See also
https://www.pervasivedisplays.com

◆ displayDecommissioning()

void displayDecommissioning ( )

◆ displayQR()

void displayQR ( const char * code)

Display the QR-code.

Display QR-code.

Parameters
codetext
  • Matter address starting with MT:
  • IP address starting with https://
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 0, required
option2text for option 1, optional
option3text for option 2, optional
option4text for option 3, optional
Returns
number of the selected option
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()