Race timer scripts, Arduino coding

jayehessohen Friday, 11/12/2021

Anyone here using Slanman's timer have a script for arduino that allows me to speed up the timer so for instance it will show 20 seconds instead of 10 seconds?  I want to double the time that it actually took.  Any help would be appreciated.



Discussion

View member profile
TheMakersBox 11/12/21

I've been building my own timers and thinking a lot about scale speed and timing.  It would be trivial to add a time adjustment, even one with a potentiometer so you could adjust it on the fly.

I would contact Slanman.  If he is not willing to provide the code, I'll bet he'd be willing to at least make you a custom firmware flash, or reflash your system for you.

Alternatively, the hacker in me says that if he is using a 16 Mhz Arduino based system, you could just swap the crystal out for 8 Mhz.  That would be the "hardware fix", but would require some soldering.

Even more "hackery", you could pull the hex file, set the chip to use its 8 Mhz internal resonator, and then reload the hex file.  Since the code is complied for a specific frequency, it would run half as fast.  That would be the "software hack", but require you to use AVRdude instead of the Arduino IDE.


  • Thanks for replying with some suggestions but I rather not get that deep lol I kinda know what you are saying but would much prefer a simple script. Slanman has been trying to help and is looking into it but I figured maybe someone here may have the same setup. Thanks! — jayehessohen
View member profile
jdensillegg 11/19/21

Assuming you have access to the arduino sketch, you should be able to make the conversion near the end of it. There should be a line that reads something like, "lcd.print(micros()/1000000);". Adjust the number based on how much you plan on slowing down your video (i.e. 500000 for half spead).

If you don't have the original sketch, anything someone else gives you will most likely make the whole thing fail.

You'd think there would be a lot of resources on this sort of thing, but I spent the better part of six months teaching myself arduino in order to simplify/customize my timing system. There are a lot of arduino resources, but our use case is so specialized that you won't easily find anything applicable. 

I appreciate this thread..... SSTDiecast on Youtube has done some of this too on video. 
I'm about to dive into this soon, every bit helps! Thanks guys!!

www.youtube.com/watch?v=YJA6OzZbuMU

View member profile
Chaos_Canyon 2/25/23

Your issue will be you can't pull the code from the arduino, at least not easily. And if you upload another code, it is quite likely all the pin allocations will be wrong and the system won't work properly.

It is just one part of the code that you add the multiplier to, in my case I make it 1.6 so the real time playback almost matches the timer.

Most likely easier to ask Slanman to reset the arduino for you.

View member profile
dr_dodge 2/27/23

so, for thoise of you who have built timers;

how hard on a scale of 1-10?

I am very good at soldering, moderate on electronics,
but never written code after learning "basic" in the 1800's and lost my charcoal and shovel years ago

I currently have a Pii and an arduino board.

has anyone tied a pii into the system to handle race results/ save times, etc?

that would be cool with a "mini jumbo tron" in the infield 

dr


  • I'm the exact opposite, lol. I can code in my sleep but soldering and all the EE stuff is a long, slow road for me. I have a box filled with Arduino, resistors, and all those things but never got very far. — redlinederby
  • But if your last code was even just BASIC stuff, that will get you pretty far even today. It's not that much different. — redlinederby
to join the conversation or sign-up now