Ubidots Community

Show current value on load of the html canvas

Hello, I don’t know much about web programming and I want to display the values of my variables as an image. For example if my light sensor detects a low luminosity, I send this value directly to ubidots which then displays a cloud image to me, and if the luminosity is strong I will display a sun and so on. I wanted to implement my idea as an if-else condition, I first started by retrieving the value of my variable (thanks to this tutorial: HTML Canvas: Creating a Real Time Widget | Ubidots Help Center) but now I have two problems:

  1. how to make the values load as soon as the dashboard is launched (in the current situation the value must change after loading the dashboard for something to be displayed)
  2. how to display an image instead of a text

I would be highly grateful to anyone who would help me implement my idea.