Carrera Digital Analog Lap Counter Part 2 Programming
Вставка
- Опубліковано 15 жов 2024
- In this video I show how to program an arduino (link below) to communicate with the sensor track and send data to smart race through a wifi connection.
Here is the code used in this video
tomsidenerpoems...
Here is the arduino with wifi that I used
These links are associated with an account in amazon that helps me out if you buy these items using these links.
Arduino Wifi
amzn.to/3vEsecn
Tom... Thanks for sharing. Excellent explanation of the code as well! Just got the prototype breadboard circuit up and running . All looks good and seems to be in working order. The track modification will be the bigger challenge.
Yeah the track modification takes some time. Good luck on your project!
@@tomsidener Hello Tom... in the process of installing the sensors and building the circuit. What brought you to building this with slot sensors instead of light bridge?
Mainly the cost. The sensors are relatively inexpensive. I tried using the camera methos first but had lots of problems with missed and extra laps.
Much more reliable than using my TEK-Slot Analog Counter/Timer option using reflective beam off the CU track. Clever hack, but not as reliable as I would have liked. Very cool you can use this with SmartRace too!
Thanks!!!
Thanks Tom! This is great. Thanks for sharing the code! I wonder if I can get this to work with Race Coordinator. I am guessing I would just need to copy and paste the code for lane 1 or 2.. and change it to 3 and 4 for lanes 3 and 4 on my track.
Is Race Coordinator free or does it cost? If its free I could download load it and do some tests.
@@tomsidener it is free..
I will install it and take a look@@twolinesslotcars
Tom... can this code be used with a light bridge with phototransistor sensors? Or would the sketch need to be modified? While I was very successful with building a working prototype with breadboard, the track mod went south. For my skill level, it is was a very tedious job disassembling and reassembling the sensors.. My solder skills are probably C- level at best... I think I may have burned out a sensor in the desolder-resolder process. Please lets us know your thoghts on using the sketch with a light bridge setup in stead of slotted sensors.
Not exactly sure how the light bridge sensor works so not 100 percent sure (I do not have one). If you can measure the voltage output on the sensor and it provides a change (up or down) when you break the beam, you should be able to read that change with the arduino. The sketch I provided switches on a voltage drop, To change it to work with a voltage spike it would need to be modified.
@@tomsidener Are you in any of the FB slot groups or on any slot forums? I would like to communicate with you with a PM rather than public posts such as these comments. I have a proposition for you.
@@truwebs You can friend me on Facebook. Just search Thomas Sidener Lincoln land community College.
Tom, since the sensors just deliver a 0/1 signal, can one utilize the digital inputs for the sensors or must they be the analog? Longer vision: can a Nano be used in place of a Uno?
Yes and Yes as long as you do not need the wifi
Yes you can use digital
What will be the improvement using digital over analog?
Actually I think analog would be the improvement because you can program the break over at whatever level you want. Digital the sensor would decide when the value was a 1 or a 0. Analog for me running at 3v is 0 to about 700. I break mine at