Page 1 of 1

Pin assignment numbering?

Posted: Fri Dec 26, 2014 2:53 pm
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?

Posted: Sat Dec 27, 2014 11:39 pm
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.

Posted: Sat Dec 27, 2014 11:41 pm
by brentp
Documentation fixed.