Is it possible to play sound?

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
Rotmilky
Posts: 1
Joined: Wed Jul 12, 2017 7:02 pm

Is it possible to play sound?

Post by Rotmilky »

The automated start scripts for logging which use either speed (getGpsSpeed) or acceleration (getAccel) work most of the time, but sometimes they either trigger when I don't want them to, or they don't trigger at the start when I expect them to. This is usually my fault (like I've exceeded 10 mph on the way to the start line). That said,I would like to play a small audible tone when logging is started and logging is stopped just to be alerted that it's working when I want it to and when it's logging when I don't want it to.

As far as I can tell from the Lua scripting guide, there are no sound control capabilities available. However, maybe I missed something so I thought I'd double check. Anyone know if there is some way to play a sound?

Worst case, I'll implement an LED indicating when it's logging.

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

The RCP doesn't have sound, but there is a simple way you could do what you're attempting. You could get a small speaker and a relay for the speaker. Hook one of the GPIO pins to the relay's signal pin and then when you start logging briefly energize the GPIO port.

Post Reply