Use Published value in Particle code

Hi,

I need to publish a integer value using “publish value” node from Node-Red. Then, I would like to use that latest published value in Particle IDE firmware.

Does anyone have any sample doing something similar?

Regards,

Ivan

You can see here. I publish “Floor” value in the Node-Red flow. How can I use latest published value in my Particle code?

Hi,

I think what needs to be done here is a subscribe().
Here are the docs:
https://docs.particle.io/reference/device-os/firmware/#particle-subscribe-
There are code examples there, perhaps you can look into them?
Best,
Gustavo.

Thanks!