Ping Rangefinder + leds

Hello all
I’m looking to use a Ping rangefinder to show children how high they can jump. What I would like to do is tie each inch that the rangefinder returns to an led in a “ruler” on the wall. The user can jump and see how high they jumped. (possibly saving the highest value for several seconds after). I have some arduino knowledge, but no experience working with sensors like this. any help, or nudge in the right direction would be greatly appreciated.


You need to look at charlieplexing to get sufficient LEDs, I would think.

I had assumed that, and understand how to do. What I don't know how to do is tell the arduino that each inch read by the rangefinder = 1 led. so let's say I'm just using the digital pins available for proof of concept. how do I get 1inch to equal 1 digital Pin?

Do you know how to get output from the PING sensor?

Do you know what range of values you get from the sensor?

Is the output linear (enough) to do what you want?

If the answer is yes to all of these questions, then you should be able to use the map function to map a value from the range of possible values to the range of inches that the possible values represent. The output from the map function will be the number of LEDs to light (i.e. the number of inches).

that should get me started. any ideas on how to get it to hold the highest value for a moment?

Just keep a max value and start a timer. When the timer runs out, start looking for a new max.

a couple of issues: i was hoping to have all 8' of led's (96) on when the rangefinder reported 96", 48 when the rangefinder reported 48" etc. The problem with this ( I'm assuming) is a considerable dimming of the leds. Is my fear unfounded? If not, is there a way around this? Otherwise it's coming along nicely:


Just keep a max value and start a timer. When the timer runs out, start looking for a new max.

can someone give an example of this, I'm having a bit of trouble. lets say that the rangefinder gives values between 0 and 96.

Thanks, I'm still learning.