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
producerandpublisherFreeRTOS tasks. - We defined a global variable to toggle data production on/off.
- In the
mqtt_event_handler_cbfunction, weswitchon theevent_idand in the case ofMQTT_EVENT_DATA, we perform the necessary checks and update theenableProducevariable as requested by the message payload. - The producer task periodically checks
enableProduceto know if it must produce or just sleep.
The following node-red flow was implemented.