Menu

LapTrackerTK

BadBeef67

I walked into my father in-laws garage and spotted a row of RC Stadium trucks on a shelf.
"Whose are those?" I asked.
"Mine and the kids, but it’s been years since we had them out".

We dusted them off, fired them up. The hobby was a bit expensive for me at the time, there was no way I could maintain it.
"I like NASCAR and oval tracks anyway. These trucks are fun, but not my style"...

"What the heck!" The next weekend, he built a suspended track made from 4x8 ply with carpet as a track surface. We sent the whole summer running pan cars on that track.

Well, the years roll by and that track has long since been torn down. Buy a house, get a better job, have kids.
"Hey Daddy, what are those cars on the wall". <--My son

Here we go again.

The idea came to me suddenly as most ideas do. "What if I suspend a scan gun above the track, and scan barcodes (or QR codes) off the top of the cars as they go under?" I didn't think it was that bad of an idea anyway... The only programming language I know is Tcl. That’s fine; Scan guns are basically keyboards, stdin. So the first version of LapTracker was born, simply taking stdin keyboard input and counting laps. Easy.

Later I used an array to track multiple cars simultaneously. Stored time stamps, comparing them to get lap times! "Oh this is GREAT!!". "Heck, if I know the track length, I can calculate MPH! COOL!!" ~you get my drift~ Quickly, it started to get out of hand. I knew enough Tk to GUI the program and gave it a few features I simply couldn't do with only a command line program.

Also, barcode scanner idea didn’t prove out. The cars travelled to fast and I couldn’t get it to work. The potential of the software though got me thinking. “What other ways can I capture the cars”? I then started thinking, what if I put an Arduino in each car and sense the start finish line somehow? There were several challenges there. Long story short, I had a friend suggest “Well, you won’t need an Arduino if you use the ESP8266”. That got me going down of building my own DIY transponder. The idea this time was to have the ESP8266 send some info over WiFi to my ever evolving LapTracker (now with Tk GUI). I re-worked LapTracker to listen to a TCP port over the network and managed to figure out how to get the ESP monitoring a GPIO pin and have that pull to ground when a reed switch is activated by an embedded magnet in the start finish line.

Feeling ambitions that LapTrackerTK might take over the world of RC Car Lap Counting, I thought "Why not calculate speed in km/h and permit track length in Meters too. Who knows, someone in EU might want to run this thing"...

The final version I give to the world is LapTrackerTK_1.5 and used freewrap to encapsulate the Tcl/Tk code as an executable. Some work using GIMP and I had an icon file. Thank you to all those owners and developers of open source code. You folks rock!
http://freewrap.sourceforge.net/
http://www.gimp.org/

This wiki has all the info you’ll need to get LapTrackerTK running with the ESP8266 DIY transponder. I've posted the raw code and the executable for all to enjoy. Check out the README file for all the features and ways to troubleshoot the software.

Also see [ESP8266]


Related

Wiki: ESP8266
Wiki: Home

MongoDB Logo MongoDB