More info on Serial Port reading /writing - firmware 2.8.4?

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
dvsu12
Posts: 18
Joined: Sun May 17, 2015 11:02 pm

More info on Serial Port reading /writing - firmware 2.8.4?

Post by dvsu12 »

Hi all,

I am trying to adapt an arduino sketch for reading ecu serial data into Lua for logging/display in the RCP 2.0.

I'd like to start with something simple - how would I read ecu part number info at 0xD0?

Is it as simple as

function ontick()

initSer(4, 9600, 8, 0, 1)
println(readSer(4, 0xD0, 50))

end()

Help!

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

Post by brentp »

Hi,

The Lua serial API has been updated here: http://autosportlabs.net/RaceCapturePro ... unications

It has full support for reading newline terminated strings as well as character based data.

Hope this helps; let us know if we can help further.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply