In the image of your Canvas, where is the 0 and 1? What lux levels are the red numbers? What are the maximum and minimum values you get with your light sensor?
Here are other gauges that are easier to use:
Make a simple Canvas based gauge and display your altitude.
A simple home made gauge:
uses two png images, a Canvas and an ImageSprite and
a LocationSensor/GPS to provide elevation information
[Altimeter2examle]
The Gauge face is an image set to the background of a Canvas. An ImageSprite is the pointer. Make the pointer with a transparent background as a png image. I am not a graphic artist; use your graphic skills to provide a more elaborate image.
The GPS Altitude value is used in a…
Extension:
HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.
Try:
33.- When we write a number from 0 to 100, in the Textbox, the needle must mark that value in the Gauge.
You must find the equation of the line that converts the values 0 and 100 to 315 and -315.
p91B_gauge.aia (169.8 KB) (unfinished)
[propuesta1]