Help creating dials

So I want a dial similar to how a speedometer displays your speed on your dashboard. I want to do this for a step counter. How would I do this?

I can help you with coding its movement, but you will have to have an image (scale) ready before that.

So @avr91 to Mellin’s point, it would be helpful to think of your speedometer dial mathematically as Mellin would need to know. Nearly all speedo’s are NOT a full circle (360 degrees). Do you want half a circle (180)? two-thirds of a circle (240)? Three-quarters (270)? If you’re making the graphic from scratch think in these terms. It’s ultimately not a dire necessity but it helps

John

Probably a 3/4 circle.

And at what amount of steps do you want it to stop?
Also, I presume you want it to start at 0 steps and move clockwise.
We also could use the angle of starting point

Those 3, or a simple design preview…

I’m mostly a total novice (though I’ve read all the tags), but:

Probably stop at 2000 steps (I’m sure this part would be easily changeable though, if at a future time I want to tweak it), start at 0 and move clockwise, and as for degrees, it could move from 240 to 120, or 270-90. I’m not sure which, tbh, but I’m sure that’s adjustable later.

Something like this:
(((clamp(#ZSC#,0,2000)/2000)*240)-90)
2000 is your end amount of steps (I would suggest at least 10’000 - I personly make like 12’000 a day).
240 is a number of degrees it will rotate (clockwise).
-90 (or +270) is the place where it starts.
function clamp() stops it from going over 2000.

1 Like

Thanks! And yeah, I forgot the extra 0 for 20k.

Also, I take it that I can do the same for battery percentage, just have to swap out the tags, or do I have to make other changes?

When you will use tags that actually ends (like the battery ends at 100) you won’t need that clamp() function anymore.
Also, remember to change all the values.

1 Like