[SOLVED] Get the value when it has changed

Hello, i´m working on a remote water sensor, and i want to save those values into a database, I send the values to ubidots api with a time interval, but i want to know if there is a way to know when the value on ubidots had change and then send it to a controller to update the database.

Greetings, you may use MQTT subscribe to notice to your microcontroller once a new value is stored in a variable. For more information, please refer to our REST API: https://ubidots.com/docs/api/mqtt.html#what-is-mqtt.

All the best

compare with last value. if difference, it is new value, store to database