Help need for AutoX Logging on/off Script and Logging LED

Discussion on the RaceCapture App - Windows, Android, OSX and Linux.

Moderators: JeffC, stieg

Post Reply
ddeltoro
Posts: 15
Joined: Mon Jan 07, 2013 8:53 pm
Location: El Paso, TX

Help need for AutoX Logging on/off Script and Logging LED

Post by ddeltoro »

As far as LUA scripting goes, I've seen the example where you use getGpsSpeed(), is there a list of the other functions available? For instance I'm looking at doing something like the following:

Code: Select all

function onTick()
  if logging() and (getGpsSpeed() == 0) then 
    stopLogging() 
    setLoggingLight(FALSE)
  end
  if not logging() and getGpsSpeed() == 0 and getRpm() > 5000 then 
    startLogging() 
    setLoggingLight(TRUE)
  end
end
So if the logger is active it will stop logging when speed reaches 0. If the logger is not active it will start logging if the speed is at 0 and the RPM's are over 5000 which should be launch conditions. I also want to set up some remote LED that I can turn on and off in the code to let me see from the driver seat if logging is on or off, not sure if the syntax above would be accurate assuming its a digital out. Also... its been years since I've worked with electronics, what would I need to do to set up an LED off of a digital out on the RCP? Do I just need to connect the positive lead to a wire going to the RCP, and the negative lead to the same ground as the RCP through a 1k resistor or do I need any additional resistance or capacitors in parallel or series? I swear eventually some of my old electronics knowledge will come back.. lol.

brentp
Site Admin
Posts: 6280
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

That's totally doable, and to make it easier for you we need to update our documentation. :) Let us get to that this week.

you can use one of the digital outputs to control an LED. you'd have to first configure that channel to output mode and then wire an LED such that the positive side of the LED goes to a voltage source (like +12v or the +5v vref, with the appropriate matching resistor) and the negative side of the LED connected to the RaceCapture output.

We have some diagrams from our Megajolt project we can recycle into a good 'howto' question on the site. On the list!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply