Authors: Mike Camara, Helen Tera & Lino Mediavilla.
Instructor: Jaanus Kaugerand.
- It builds on the previous examples built over the course.
- We have a queue for communication between
producer
andpublisher
FreeRTOS tasks. - We defined a global variable to toggle data production on/off.
- In the
mqtt_event_handler_cb
function, weswitch
on theevent_id
and in the case ofMQTT_EVENT_DATA
, we perform the necessary checks and update theenableProduce
variable as requested by the message payload. - The producer task periodically checks
enableProduce
to know if it must produce or just sleep.
The following node-red flow was implemented.