Object as battery indicator

Hello, i’m new to facer and I’ve got a question which could be simple but I can’t get a solution for it. I want use an object as battery level indicator ( a car going left to right). I use the tag for battery percentage on the x position and the object moves. But how do I make the formule for the correct (x) starting position? I tried the x-#BLP# but that doesn’t work.

Ok, allow me to explain:

The first thing you want to do is take measurements:
Where do you want your car to start and where to stop and also what is the distance between those points?

You start with a tag that goes from 0 to 100.
First, you need to get that tag into the 0-1 range, like this:
Now all you need to do is multiply that by the range you want your car to move (let’s say 250 units):
This gives you the formula for moving from point “0” to point “250” with accordance to battery level, but let’s say you want it to start at 38 instead of on 0.
All you need to do is add it:
Thanks to this start of the range go from 0 to 38 and the end of it goes from 250 to 288.

Now you can do some cleaning inside of that script (I personally use http://www.wolframalpha.com/ especially with more advanced formulas):


Thanks, not as simple as I thought. Hope I get it to work.

Hmmmm, it doesn’t do the trick. When I use your example formula it places te object outside of the watch and doesn’t move when I use the day slider at the bottom. When I use only the #BLP# tag in the X position it does what I want, but it places the object in the middle of the screen and I want it to start from position 240 on the x-axe.

Read the rest and use the later version.

I maybe misused the quote, offcourse I used (((#BLP#*5)+76)/2) to try. I use the browserversion to design, is there an other? Sorry, I’m new to this, so maybe I ask stupid questions. Thanks for your patience.

By later version I ment:

You should use it instead of:

Becouse the second one is simplified and it will be hard to edit it.

Also now I know where you want it to start I can give you a more personalized version:
This will go from 240 to 360.

Thanks, gonna try it

What am I doing wrong? Used your tag in de x position with an example picture, but it keeps placing it outside of the watchface.

Can you enable the inspection mode, so I can look under the hood?

Also if you could duplicate that image you want to be moving and place 2 unmoving copies of it in the place you want it to start and in the place where you want it to end?

Inspection is enabled. Placed it in the background I like to use. The idea is that car drives as battery indicator from 100 to 0.

1 Like

OMG the error is so simple!
You used #BLP# which gives back a text-based data (with a % mark at the end), it cannot be used in calculations.
Instead, use #BLN#.

And the end code should be this:

Like I said I’m new to this :wink:. Gonna try tomorrow.

And it works! See the final result. Kept is simple because of the background. If you look at it at first glance do you see the car as battery indicator or isn’t that clear? Thanks for your help, brought me steps futher in designing.

1 Like

If one doesn’t know that it is a battery indicator then it is unclear, but when one knows it is it, then it is easy to read.