Turn on an LED with RSUDP

I am trying to turn on a Led with the RSUDP, I already added my GPIO to the c_alert module, when it exceeds the limit, my LED turns on, however it does not turn on, my question is, can I use that module or is there any other way to make it work my LED using the RSUDP.

1 Like

Hello Flomp,

The c_alert module of RSUDP is indeed the one you need to initiate the process. As per the module description:

If the STA/LTA ratio goes above a certain value (defined by “threshold” ), then the rsudp.p_producer.Producer thread will generate an ALARM “event packet”, to be distributed to every consumer module. This tells all consumers listening for ALARM messages to do something.

However, you will need a consumer module that will receive this ALARM message and execute its own code on it, that is, in your case, turning on a led.

For now, the main ALARM-executing modules that we have are, among the others, alarmsound, telegram messages, and tweet messages. You will need to create a new one that will suit your needs, and you can find more information on how to do so here: 1. Program architecture and flow — rsudp documentation

HI! Where you able to make a custom module? Im working on something very similar and im having trouble working the custom module, would apreciate your experience with it