Pin assignment numbering?

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
GTIspirit
Posts: 249
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Pin assignment numbering?

Post by GTIspirit »

How are the pin assignments for the Lua script API configured? 0 is always the first pin?

e.g. Frequency Input #1 is Channel 0?
Timer / RPM Sensor Functions
getTimerRpm(channel)

Returns the current RPM of the specified timer input channel. Note, the timer channel configuration must be set to RPM mode.

params
channel: Timer channel 0 - 3
returns: RPM value
It looks like there is a discrepancy between the API documentation and the pin availability.

Channel
1. Ground
2. +12v
3. Analog/Frequency out 4
4. Analog/Frequency out 3
5. Analog/Frequency out 2
6. Analog/Frequency out 1
7. +5V Voltage reference
8. Analog input 7
9. Analog input 6
10. Analog input 5
11. Analog input 4
12. Analog input 3
13. Analog input 2
14. Analog input 1
15. General purpose input/output 3
16. General purpose input/output 2
17. General purpose input/output 1
18. Frequency/pulse input 3
19. Frequency/pulse input 2
20. Frequency/pulse input 1

There are only three timer channels, right? So the API documentation should be channels 0-2, or?
And there are only 7 analog input channels, so it should be 0-6, or?

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

Post by brentp »

Hi,

In Lua script the channel numbering start at zero, correct.

Looks like we have a typo in the timer channel documentation. However, note that the 8th sensor (#7) and is internally connected and dedicated to measuring battery voltage.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

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

Post by brentp »

Documentation fixed.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply