RaceCapturePro Lua Scripting
This page is under construction. Check back soon!
Scripting functions for RaceCapture/Pro
getGpio
Retrieves the state of the GPIO ports
state getGpio(port)
- params: port - integer 0 - 2
- returns: 1 = port is high, 0 = port is low
When the port is configured for input mode, a voltage high input (> 2 volts) will read as 1; a voltage low will read as 0. A disconnected port will read as high due to the internal pullup resistor.
When the port is configured as output, the port reads 1 when the port is activated (output transistor is connected to ground) and 0 when the port is deactivated (pullup resistor is active)
setGpio
Sets the state of the GPIO port when the port is configured for output mode.
setGpio(port, state)
- params: port - integer 0 - 2, state - 1 = output active; 0 = output inactive
- returns: none
When the state specified is 1, the output is active (transistor is conneced to ground). When state is 0, transistor is disconnected, and pullup resistor is active.
When configured for input mode this function has no effect.
getButton
Gets the state of the front panel pushbutton.
state getButton()
- params: none
- returns: 1 = pushbutton is depressed; 0 = pushbutton is not depressed
isSDCardPresent
Indicates if an SD card is present in the socket
present isSDCardPresent()
- params: none
- returns: 1 = SD card is present in socket; 0 = SD card not present
isSDCardWritable
Indicates if the SD card is writable (lock switch on SD card is active)
- params: none
- returns: 1 = SD card is writable; 0 = SD card is not writable