Time of Flight sensor and display

siclark
Posts: 2355
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Time of Flight sensor and display

Post by siclark »

Hi.. its been a while since I have used pibeacon but now looking to use a ToF sensor to measure the water in my espresso machine, and was thinking of doing something with an arduino nano, but never used one before, when I realised that as these are i2c they would probably be one that works here, and there is!

I was planning to use a little lcd display on the arduino, but could just use indigo to notify me when I should be topping it up (before it hits empty and I have to fill it up when not caffeinated!). However a screen would be good as well. I see some comments about displays but hard to see a list of what is supported.

Ideally I would be able to convert the distance, ie between 3cm (full) and 25cm (empty ) into a % full indication on the display, but distance would be ok too. Is this possible?

Cheers
Simon.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Time of Flight sensor and display

Post by kw123 »

Simon ,

there a re properties you can set in device edit of all distance sensors: offset and multiply

value shown: ( value measured + offset ) * multiply
so try
offset = -25
multiply = - 100/22 = -4.54545

that gives 0 at 25 and 100 at 3

but if it goes over or under it will give you >100 and < 0 numbers

I could add min/ max to the options if needed

Karl
siclark
Posts: 2355
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Time of Flight sensor and display

Post by siclark »

Cheers. Let me get one and play.
One problem I have with use of a display is not having a case for it so looks “unfinished “
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Time of Flight sensor and display

Post by kw123 »

please also check out v ..167.71 it has properties cut max and cut min. that will limit the distance values between these values.

Karl
siclark
Posts: 2355
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Time of Flight sensor and display

Post by siclark »

Cheers. Sensor arrives Friday so I’ll have a test then.
Post Reply

Return to “piBeacon”