Skip to content

[request] Replace polling by event in Matter examples #62

@rei-vilo

Description

@rei-vilo

Summary

In many examples, delay before two consecutive data acquisition is performed by polling.

if ((last_action_temp + 10000) < millis()) {
last_action_temp = millis();
float current_cpu_temp = getCPUTemp();
// Publish the temperature value - you can also use 'matter_temp_sensor = current_cpu_temp'
matter_temp_sensor.set_measured_value_celsius(current_cpu_temp);
Serial.printf("Current CPU temperature: %.02f C\n", current_cpu_temp);
}

This might not be especially low-power.

How to use instead an event raised by a timer? As SiLabs core for Arduino seems to rely on FreeRTOS, the RTOS elements should be already available.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions