[SOLVED] HTML Canvas - use callback to get variable?

I now have a working example of an HTML Canvas slider that uses setInterval() and Get to check for changes to the variable posted by my Arduino NANO. When I look at the HTML Canvas examples they use callback instead - but this only seems to work for variables changed by other widgets on the Dashboard.

Is it possible to detect changes posted by an Arduino (or other device) to a variable by callback?

Hi there, please refer to this article, there you will find an example to create widgets real time updated, the example implements a pub/sub socket connection instead of polling data using setInterval(), which is faster and memory consumption lower.

All the best