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_RGB.ino File Reference

Example of Matter device for EXT4 extension board - All editions. More...

#include "PDLS_Common.h"
#include "Pervasive_Wide_Small.h"
#include "PDLS_Advanced.h"
#include <Matter.h>
#include <MatterLightbulb.h>
#include "ezWS2812gpio.h"
#include "qrcode.h"
Include dependency graph for EXT4_Matter_RGB.ino:

Classes

struct  hsb_s
 

Functions

void displayAbout ()
 Display the About page.
 
void displayQR (const char *code)
 Display the QR-code.
 
void displayValue (bool flag=true)
 Manage and display the RGB LED.
 
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 of Matter device for EXT4 extension board - All editions.

Based on Matter color lightbulb example

The example shows the basic usage of the Arduino Matter API.

The example lets users control a WS2812 LED strip/ring acting as a Matter lightbulb. It's possible to switch the LEDs on/off, adjust the brightness and the color as well. The device has to be commissioned to a Matter hub first. A WS2812 (NeoPixel) strip/ring/device needs to be connected to the board to the SPI SDO.

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()

void displayValue ( bool flag = true)

Manage and display the RGB LED.

Parameters
flagdefault = true = update LED, false otherwise

◆ 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()