|  |  | 
| Line 16: | Line 16: | 
|  |  |  |  | 
|  | ==Detailed description== |  | ==Detailed description== | 
|  | + |  | 
|  | + |  | 
|  |  |  |  | 
|  |  |  |  | 
| Line 22: | Line 24: | 
|  |  |  |  | 
|  | ==Examples== |  | ==Examples== | 
|  | + |  | 
|  | + |  | 
|  |  |  |  | 
|  |  |  |  | 
| Line 115: | Line 119: | 
|  | |- |  | |- | 
|  | | colspan="2" | Initialises the component ready for I2C communications  |  | | colspan="2" | Initialises the component ready for I2C communications  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets up up the communication bus and initialises the accelerometer module.  Returns 0 for success and > 0 for fail. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SimSetGyro'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the XYZ slider values to be set via the simulation 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | X
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | Y
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | Z
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateAccelerometerData'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Reads from the accelerometer and updates the local XYZ variables. Returns 1 for new data and 0 for no new data 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SimSetCompass'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the XYZ slider values to be set via the simulation 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | X
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | Y
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | Z
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read_Bearing'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Reads the current sensor compass bearing based on degrees CW from magnetic north. Returns 0-359 where 0 = North, 90 = East, 180 = South, 270 = West Requires the ArcTan floating point function to be available to work correctly. Supported on AVR, 16-bit  
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | NumSamples
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | The number of readings to base the bearing on 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets up up the communication bus and initialises the accelerometer module.  Returns 0 for success and > 0 for fail. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets the selected digital pin to an output and assigns the output state. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0-29 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:]] - 
 |  | 
| − | | width="90%" | State
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0-1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023. Performs the selected number of samples with the selected time in microseconds in between samples 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | ADCChannel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0, 3-7 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SampleCount
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 1- 100 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SampleDelay
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Delay in us between each sample 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireScanBus'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIInitialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Initialsie the SPI module ready for communications 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireReceiveByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Receives a byte from the one wire bus a bit at a time 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Transmit a byte using the I2C bus 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | DataOut
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Send a byte via the UART module 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Data
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Data Byte to send. Range: 0-255 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetDeviceCount'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Returns the number of devices found by the last ScanBus operation. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetPrescaler'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets the prescaler for the PWM output 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0 - 11 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Prescaler
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Period
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Enable a PWM output 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0-11 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray10'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | ADCChannel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0, 3-7 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SampleCount
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 1- 32 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | SampleDelay
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Delay in us between each sample 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Samples
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | 10-bit samples returned from the function 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage8'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | ADCChannel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 0, 3-7 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SampleCount
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range: 1- 100 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SampleDelay
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Delay in us between each sample 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | EnableMask
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Range 0-63 or 0b00000 to 0b111111 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
|  | |- |  | |- | 
|  | |- |  | |- |