churcn10
Posts: 2
Joined: Fri Apr 12, 2013 3:17 pm

Timing my daughter's running

Fri Apr 12, 2013 3:22 pm

Hi,

I have trawled the Forum for advice and found none, but apologies if this info is already out there. I want to be able to time my 8-year old's running. I want to be able to shout go, and hit the space bar and start a timer running. At the end of the run, I want her to be able to break a beam of some sort and stop the clock. How would you go about it?

I am only slightly above newbie-level.

Ta, Neil.

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Timing my daughter's running

Fri Apr 12, 2013 5:13 pm

There is always more than one way to do it. And one way to tackle 'hard' problems is to break them in bits that are only just beyond what you can do know, and learn how to do them.

My line of approach would be to build something using just the keyboard [space bar] to both start and stop a 'stopwatch' in the first instance. If you were doing it in Python, read the time when the space bar is first pressed, and again when it is pressed a second time. Work out and display the difference and you have your daughter's performance. You've already got something that 'works'! Well done!

For the 'magic beam' part - how about an ultrasonic sensor - like a reversing aid on a car? If you google for 'Pi' + 'ultrasonic sensor' you'll find several existing examples of how to implement this. Instead of measuring distance, perhaps you just want to look for a sudden reduction in distance as your runner causes a reflection of the beam? When you see that you just use it as an alternative to the second 'stopwatch' keypress. Job done!
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

NathanBookham
Posts: 64
Joined: Sat Dec 15, 2012 9:18 am

Re: Timing my daughter's running

Sat Apr 13, 2013 1:55 pm

I have an ultrasonic sensor and PIR sensor hooked up to my Pi. Raspberry Pi Spy is a great website and has tutorials on both. But I think you might benefit better with a PIR sensor, as it is designed to detect movement, whereas the ultrasonic sensor is designed to detect distance. Both would work, but I'm just recommending the PIR sensor.
This account is now inactive.
I am now known as 'InverseSandwich'

churcn10
Posts: 2
Joined: Fri Apr 12, 2013 3:17 pm

Re: Timing my daughter's running

Sun Apr 14, 2013 9:21 pm

Thanks very much for the suggestions guys. I will try both and look at the Raspberry Pi Spy site, that sounds great fun. Your input is much appreciated, and I'll post how I get on.

Return to “Automation, sensing and robotics”