Author
|
Matrix TSL
|
Version
|
2.0
|
Category
|
API Slave Devices
|
API (Arduino Mega) component
Connects to an Arduino Mega running the API Firmware allowing the board to become a slave to the Flowcode Embedded simulation or Flowcode App Developer. Supports: Digital IO / ADC / I2C / SPI / UART / PWM See Flowcode Help Wiki for firmware.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Arduino_Mega_API_Comp.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Arduino_Mega_API_Comp.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
|
I2CInitialise
|
Initialsie the I2C module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
ADCSampleArray8
|
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 and returns each sample in a single packet
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Samples
|
8-bit samples returned from the function
|
- VOID
|
Return
|
|
SPITransferTrans
|
Transfer an array of bytes using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- UINT
|
Count
|
Number of bytes to send and receive
|
- BYTE
|
DataOut
|
Outgoing data
|
- BYTE
|
DataIn
|
Incoming data
|
- VOID
|
Return
|
|
IOGetInputPin
|
Sets the selected digital pin to an input and reads the input state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
Return
|
|
UARTBaud
|
Control the communications rate of the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Rate
|
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
|
- VOID
|
Return
|
|
ADCSample8
|
Reads the voltage present on an Analog pin as an 8-bit value range 0-255
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- BYTE
|
Return
|
|
I2CTransReceive
|
Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data variable to receive into
|
- UINT
|
Count
|
Number of bytes to receive
|
- UINT
|
Return
|
|
UARTCheckRX
|
Check to see if the UART module has received any data
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
UARTInitialise
|
Initialise the UART module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- VOID
|
Return
|
|
RegisterWrite
|
Writes to one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Data
|
The data value to assign to the register
|
- VOID
|
Return
|
|
ADCSetPrechargeTime
|
Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
|
- BYTE
|
ChargeTime
|
Default 10
|
- VOID
|
Return
|
|
RegisterRead
|
Read one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Return
|
|
I2CRestart
|
Put the I2C Module into Restart mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
PWMDisable
|
Disable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
I2CStart
|
Put the I2C Module into Start mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
SPITransfer
|
Transfer a byte using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BYTE
|
Return
|
|
I2CReceive
|
Receive a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BOOL
|
Last
|
Last byte to receive: Range 0-1
|
- BYTE
|
Return
|
|
I2CStop
|
Put the I2C Module into Stop mode
|
- BYTE
|
Channel
|
|
- VOID
|
Return
|
|
ADCSetReferenceVoltage
|
Specified the reference setting for ADC reads.
|
- BYTE
|
RefType
|
0=AREF, 1=VCC, 3=Internal 1.1V
|
- VOID
|
Return
|
|
SPIPrescaler
|
Modify the speed of the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
Prescaler
|
Range: 0-2
|
- VOID
|
Return
|
|
PWMSetDuty
|
Sets the duty for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Duty
|
|
- VOID
|
Return
|
|
ADCSample10
|
Reads the voltage present on an Analog pin as an 10-bit value range 0-1023
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- UINT
|
Return
|
|
I2CTransSend
|
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data to send
|
- UINT
|
Count
|
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
|
- UINT
|
Return
|
|
IOSetOutputPin
|
Sets the selected digital pin to an output and assigns the output state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
State
|
Range: 0-1
|
- VOID
|
Return
|
|
UARTReceive
|
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
ADCSampleAverage10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Return
|
|
I2CTransInit
|
Initialises the I2C Transaction mode with the 7-bit device address
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DeviceAddress
|
7-bit Device Address
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
SPIInitialise
|
Initialsie the SPI module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- VOID
|
Return
|
|
I2CSend
|
Transmit a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BOOL
|
Return
|
|
UARTSend
|
Send a byte via the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Data
|
Data Byte to send. Range: 0-255
|
- VOID
|
Return
|
|
PWMSetPrescaler
|
Sets the prescaler for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Prescaler
|
|
- BYTE
|
Period
|
Default 255
|
- VOID
|
Return
|
|
PWMEnable
|
Enable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
ADCSampleArray10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Samples
|
10-bit samples returned from the function
|
- VOID
|
Return
|
|
ADCSampleAverage8
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the comms to the Arduino board ready for commands to be sent.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Connection
|
|
COM Port
|
Lists all the current available COM port hardware on your PC.
|
|
Refresh Ports
|
|
|
API Peripherals
|
|
Digital IO
|
|
|
Analog Input
|
|
|
Analog Output
|
|
|
PWM Output
|
|
|
I2C Bus
|
|
|
SPI Bus
|
|
|
UART
|
|
|
Servo
|
|
|
Console
|
|
Console Log
|
Create an automatic console log of the commands sent to the Arduino
|
|
Log Mode
|
Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns
|
==Macro reference==
|
I2CInitialise
|
Initialsie the I2C module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
ADCSampleArray8
|
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 and returns each sample in a single packet
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Samples
|
8-bit samples returned from the function
|
- VOID
|
Return
|
|
SPITransferTrans
|
Transfer an array of bytes using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- UINT
|
Count
|
Number of bytes to send and receive
|
- BYTE
|
DataOut
|
Outgoing data
|
- BYTE
|
DataIn
|
Incoming data
|
- VOID
|
Return
|
|
IOGetInputPin
|
Sets the selected digital pin to an input and reads the input state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
Return
|
|
UARTBaud
|
Control the communications rate of the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Rate
|
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
|
- VOID
|
Return
|
|
ADCSample8
|
Reads the voltage present on an Analog pin as an 8-bit value range 0-255
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- BYTE
|
Return
|
|
I2CTransReceive
|
Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data variable to receive into
|
- UINT
|
Count
|
Number of bytes to receive
|
- UINT
|
Return
|
|
UARTCheckRX
|
Check to see if the UART module has received any data
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
UARTInitialise
|
Initialise the UART module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- VOID
|
Return
|
|
RegisterWrite
|
Writes to one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Data
|
The data value to assign to the register
|
- VOID
|
Return
|
|
ADCSetPrechargeTime
|
Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
|
- BYTE
|
ChargeTime
|
Default 10
|
- VOID
|
Return
|
|
RegisterRead
|
Read one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Return
|
|
I2CRestart
|
Put the I2C Module into Restart mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
PWMDisable
|
Disable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
I2CStart
|
Put the I2C Module into Start mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
SPITransfer
|
Transfer a byte using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BYTE
|
Return
|
|
I2CReceive
|
Receive a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BOOL
|
Last
|
Last byte to receive: Range 0-1
|
- BYTE
|
Return
|
|
I2CStop
|
Put the I2C Module into Stop mode
|
- BYTE
|
Channel
|
|
- VOID
|
Return
|
|
ADCSetReferenceVoltage
|
Specified the reference setting for ADC reads.
|
- BYTE
|
RefType
|
0=AREF, 1=VCC, 3=Internal 1.1V
|
- VOID
|
Return
|
|
SPIPrescaler
|
Modify the speed of the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
Prescaler
|
Range: 0-2
|
- VOID
|
Return
|
|
PWMSetDuty
|
Sets the duty for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Duty
|
|
- VOID
|
Return
|
|
ADCSample10
|
Reads the voltage present on an Analog pin as an 10-bit value range 0-1023
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- UINT
|
Return
|
|
I2CTransSend
|
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data to send
|
- UINT
|
Count
|
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
|
- UINT
|
Return
|
|
IOSetOutputPin
|
Sets the selected digital pin to an output and assigns the output state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
State
|
Range: 0-1
|
- VOID
|
Return
|
|
UARTReceive
|
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
ADCSampleAverage10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Return
|
|
I2CTransInit
|
Initialises the I2C Transaction mode with the 7-bit device address
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DeviceAddress
|
7-bit Device Address
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
SPIInitialise
|
Initialsie the SPI module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- VOID
|
Return
|
|
I2CSend
|
Transmit a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BOOL
|
Return
|
|
UARTSend
|
Send a byte via the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Data
|
Data Byte to send. Range: 0-255
|
- VOID
|
Return
|
|
PWMSetPrescaler
|
Sets the prescaler for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Prescaler
|
|
- BYTE
|
Period
|
Default 255
|
- VOID
|
Return
|
|
PWMEnable
|
Enable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
ADCSampleArray10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Samples
|
10-bit samples returned from the function
|
- VOID
|
Return
|
|
ADCSampleAverage8
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the comms to the Arduino board ready for commands to be sent.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Connection
|
|
COM Port
|
Lists all the current available COM port hardware on your PC.
|
|
Refresh Ports
|
|
|
API Peripherals
|
|
Digital IO
|
|
|
Analog Input
|
|
|
Analog Output
|
|
|
PWM Output
|
|
|
I2C Bus
|
|
|
SPI Bus
|
|
|
UART
|
|
|
Servo
|
|
|
Console
|
|
Console Log
|
Create an automatic console log of the commands sent to the Arduino
|
|
Log Mode
|
Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns
|
==Macro reference==
|
I2CInitialise
|
Initialsie the I2C module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
ADCSampleArray8
|
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 and returns each sample in a single packet
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Samples
|
8-bit samples returned from the function
|
- VOID
|
Return
|
|
SPITransferTrans
|
Transfer an array of bytes using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- UINT
|
Count
|
Number of bytes to send and receive
|
- BYTE
|
DataOut
|
Outgoing data
|
- BYTE
|
DataIn
|
Incoming data
|
- VOID
|
Return
|
|
IOGetInputPin
|
Sets the selected digital pin to an input and reads the input state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
Return
|
|
UARTBaud
|
Control the communications rate of the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Rate
|
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
|
- VOID
|
Return
|
|
ADCSample8
|
Reads the voltage present on an Analog pin as an 8-bit value range 0-255
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- BYTE
|
Return
|
|
I2CTransReceive
|
Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data variable to receive into
|
- UINT
|
Count
|
Number of bytes to receive
|
- UINT
|
Return
|
|
UARTCheckRX
|
Check to see if the UART module has received any data
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
UARTInitialise
|
Initialise the UART module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- VOID
|
Return
|
|
RegisterWrite
|
Writes to one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Data
|
The data value to assign to the register
|
- VOID
|
Return
|
|
ADCSetPrechargeTime
|
Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
|
- BYTE
|
ChargeTime
|
Default 10
|
- VOID
|
Return
|
|
RegisterRead
|
Read one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Return
|
|
I2CRestart
|
Put the I2C Module into Restart mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
PWMDisable
|
Disable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
I2CStart
|
Put the I2C Module into Start mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
SPITransfer
|
Transfer a byte using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BYTE
|
Return
|
|
I2CReceive
|
Receive a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BOOL
|
Last
|
Last byte to receive: Range 0-1
|
- BYTE
|
Return
|
|
I2CStop
|
Put the I2C Module into Stop mode
|
- BYTE
|
Channel
|
|
- VOID
|
Return
|
|
ADCSetReferenceVoltage
|
Specified the reference setting for ADC reads.
|
- BYTE
|
RefType
|
0=AREF, 1=VCC, 3=Internal 1.1V
|
- VOID
|
Return
|
|
SPIPrescaler
|
Modify the speed of the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
Prescaler
|
Range: 0-2
|
- VOID
|
Return
|
|
PWMSetDuty
|
Sets the duty for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Duty
|
|
- VOID
|
Return
|
|
ADCSample10
|
Reads the voltage present on an Analog pin as an 10-bit value range 0-1023
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- UINT
|
Return
|
|
I2CTransSend
|
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data to send
|
- UINT
|
Count
|
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
|
- UINT
|
Return
|
|
IOSetOutputPin
|
Sets the selected digital pin to an output and assigns the output state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
State
|
Range: 0-1
|
- VOID
|
Return
|
|
UARTReceive
|
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
ADCSampleAverage10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Return
|
|
I2CTransInit
|
Initialises the I2C Transaction mode with the 7-bit device address
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DeviceAddress
|
7-bit Device Address
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
SPIInitialise
|
Initialsie the SPI module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- VOID
|
Return
|
|
I2CSend
|
Transmit a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BOOL
|
Return
|
|
UARTSend
|
Send a byte via the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Data
|
Data Byte to send. Range: 0-255
|
- VOID
|
Return
|
|
PWMSetPrescaler
|
Sets the prescaler for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Prescaler
|
|
- BYTE
|
Period
|
Default 255
|
- VOID
|
Return
|
|
PWMEnable
|
Enable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
ADCSampleArray10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Samples
|
10-bit samples returned from the function
|
- VOID
|
Return
|
|
ADCSampleAverage8
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the comms to the Arduino board ready for commands to be sent.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Connection
|
|
COM Port
|
Lists all the current available COM port hardware on your PC.
|
|
Refresh Ports
|
|
|
API Peripherals
|
|
Digital IO
|
|
|
Analog Input
|
|
|
Analog Output
|
|
|
PWM Output
|
|
|
I2C Bus
|
|
|
SPI Bus
|
|
|
UART
|
|
|
Servo
|
|
|
Console
|
|
Console Log
|
Create an automatic console log of the commands sent to the Arduino
|
|
Log Mode
|
Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns
|
==Macro reference==
|
I2CInitialise
|
Initialsie the I2C module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
ADCSampleArray8
|
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 and returns each sample in a single packet
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Samples
|
8-bit samples returned from the function
|
- VOID
|
Return
|
|
SPITransferTrans
|
Transfer an array of bytes using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- UINT
|
Count
|
Number of bytes to send and receive
|
- BYTE
|
DataOut
|
Outgoing data
|
- BYTE
|
DataIn
|
Incoming data
|
- VOID
|
Return
|
|
IOGetInputPin
|
Sets the selected digital pin to an input and reads the input state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
Return
|
|
UARTBaud
|
Control the communications rate of the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Rate
|
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
|
- VOID
|
Return
|
|
ADCSample8
|
Reads the voltage present on an Analog pin as an 8-bit value range 0-255
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- BYTE
|
Return
|
|
I2CTransReceive
|
Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data variable to receive into
|
- UINT
|
Count
|
Number of bytes to receive
|
- UINT
|
Return
|
|
UARTCheckRX
|
Check to see if the UART module has received any data
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
UARTInitialise
|
Initialise the UART module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- VOID
|
Return
|
|
RegisterWrite
|
Writes to one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Data
|
The data value to assign to the register
|
- VOID
|
Return
|
|
ADCSetPrechargeTime
|
Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
|
- BYTE
|
ChargeTime
|
Default 10
|
- VOID
|
Return
|
|
RegisterRead
|
Read one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Return
|
|
I2CRestart
|
Put the I2C Module into Restart mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
PWMDisable
|
Disable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
I2CStart
|
Put the I2C Module into Start mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
SPITransfer
|
Transfer a byte using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BYTE
|
Return
|
|
I2CReceive
|
Receive a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BOOL
|
Last
|
Last byte to receive: Range 0-1
|
- BYTE
|
Return
|
|
I2CStop
|
Put the I2C Module into Stop mode
|
- BYTE
|
Channel
|
|
- VOID
|
Return
|
|
ADCSetReferenceVoltage
|
Specified the reference setting for ADC reads.
|
- BYTE
|
RefType
|
0=AREF, 1=VCC, 3=Internal 1.1V
|
- VOID
|
Return
|
|
SPIPrescaler
|
Modify the speed of the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
Prescaler
|
Range: 0-2
|
- VOID
|
Return
|
|
PWMSetDuty
|
Sets the duty for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Duty
|
|
- VOID
|
Return
|
|
ADCSample10
|
Reads the voltage present on an Analog pin as an 10-bit value range 0-1023
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- UINT
|
Return
|
|
I2CTransSend
|
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data to send
|
- UINT
|
Count
|
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
|
- UINT
|
Return
|
|
IOSetOutputPin
|
Sets the selected digital pin to an output and assigns the output state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
State
|
Range: 0-1
|
- VOID
|
Return
|
|
UARTReceive
|
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
ADCSampleAverage10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Return
|
|
I2CTransInit
|
Initialises the I2C Transaction mode with the 7-bit device address
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DeviceAddress
|
7-bit Device Address
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
SPIInitialise
|
Initialsie the SPI module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- VOID
|
Return
|
|
I2CSend
|
Transmit a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BOOL
|
Return
|
|
UARTSend
|
Send a byte via the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Data
|
Data Byte to send. Range: 0-255
|
- VOID
|
Return
|
|
PWMSetPrescaler
|
Sets the prescaler for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Prescaler
|
|
- BYTE
|
Period
|
Default 255
|
- VOID
|
Return
|
|
PWMEnable
|
Enable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
ADCSampleArray10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Samples
|
10-bit samples returned from the function
|
- VOID
|
Return
|
|
ADCSampleAverage8
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the comms to the Arduino board ready for commands to be sent.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Connection
|
|
COM Port
|
Lists all the current available COM port hardware on your PC.
|
|
Refresh Ports
|
|
|
API Peripherals
|
|
Digital IO
|
|
|
Analog Input
|
|
|
Analog Output
|
|
|
PWM Output
|
|
|
I2C Bus
|
|
|
SPI Bus
|
|
|
UART
|
|
|
Servo
|
|
|
Console
|
|
Console Log
|
Create an automatic console log of the commands sent to the Arduino
|
|
Log Mode
|
Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns
|
==Macro reference==
|
I2CInitialise
|
Initialsie the I2C module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
ADCSampleArray8
|
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 and returns each sample in a single packet
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Samples
|
8-bit samples returned from the function
|
- VOID
|
Return
|
|
SPITransferTrans
|
Transfer an array of bytes using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- UINT
|
Count
|
Number of bytes to send and receive
|
- BYTE
|
DataOut
|
Outgoing data
|
- BYTE
|
DataIn
|
Incoming data
|
- VOID
|
Return
|
|
IOGetInputPin
|
Sets the selected digital pin to an input and reads the input state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
Return
|
|
UARTBaud
|
Control the communications rate of the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Rate
|
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
|
- VOID
|
Return
|
|
ADCSample8
|
Reads the voltage present on an Analog pin as an 8-bit value range 0-255
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- BYTE
|
Return
|
|
I2CTransReceive
|
Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data variable to receive into
|
- UINT
|
Count
|
Number of bytes to receive
|
- UINT
|
Return
|
|
UARTCheckRX
|
Check to see if the UART module has received any data
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
UARTInitialise
|
Initialise the UART module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- VOID
|
Return
|
|
RegisterWrite
|
Writes to one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Data
|
The data value to assign to the register
|
- VOID
|
Return
|
|
ADCSetPrechargeTime
|
Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
|
- BYTE
|
ChargeTime
|
Default 10
|
- VOID
|
Return
|
|
RegisterRead
|
Read one of the registers on-board the device
|
- UINT
|
RegisterAddress
|
The address of the register
|
- BYTE
|
Return
|
|
I2CRestart
|
Put the I2C Module into Restart mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
PWMDisable
|
Disable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
I2CStart
|
Put the I2C Module into Start mode
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- VOID
|
Return
|
|
SPITransfer
|
Transfer a byte using the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BYTE
|
Return
|
|
I2CReceive
|
Receive a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BOOL
|
Last
|
Last byte to receive: Range 0-1
|
- BYTE
|
Return
|
|
I2CStop
|
Put the I2C Module into Stop mode
|
- BYTE
|
Channel
|
|
- VOID
|
Return
|
|
ADCSetReferenceVoltage
|
Specified the reference setting for ADC reads.
|
- BYTE
|
RefType
|
0=AREF, 1=VCC, 3=Internal 1.1V
|
- VOID
|
Return
|
|
SPIPrescaler
|
Modify the speed of the SPI bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- BYTE
|
Prescaler
|
Range: 0-2
|
- VOID
|
Return
|
|
PWMSetDuty
|
Sets the duty for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Duty
|
|
- VOID
|
Return
|
|
ADCSample10
|
Reads the voltage present on an Analog pin as an 10-bit value range 0-1023
|
- BYTE
|
ADCChannel
|
Range: 0-15
|
- UINT
|
Return
|
|
I2CTransSend
|
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
Data
|
Data to send
|
- UINT
|
Count
|
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
|
- UINT
|
Return
|
|
IOSetOutputPin
|
Sets the selected digital pin to an output and assigns the output state.
|
- BYTE
|
Pin
|
Range: 0-53
|
- BOOL
|
State
|
Range: 0-1
|
- VOID
|
Return
|
|
UARTReceive
|
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Return
|
|
ADCSampleAverage10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Return
|
|
I2CTransInit
|
Initialises the I2C Transaction mode with the 7-bit device address
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DeviceAddress
|
7-bit Device Address
|
- BYTE
|
Baud
|
0=100KHz, 1=400KHz, 2=1MHz
|
- VOID
|
Return
|
|
SPIInitialise
|
Initialsie the SPI module ready for communications
|
- BYTE
|
Channel
|
Channel Index: Range 0 - SPI Bus Count - 1
|
- VOID
|
Return
|
|
I2CSend
|
Transmit a byte using the I2C bus
|
- BYTE
|
Channel
|
Channel Index: Range 0 - I2C Bus Count - 1
|
- BYTE
|
DataOut
|
|
- BOOL
|
Return
|
|
UARTSend
|
Send a byte via the UART module
|
- BYTE
|
Channel
|
Channel Index: Range 0 - UART Bus Count - 1
|
- BYTE
|
Data
|
Data Byte to send. Range: 0-255
|
- VOID
|
Return
|
|
PWMSetPrescaler
|
Sets the prescaler for the PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- BYTE
|
Prescaler
|
|
- BYTE
|
Period
|
Default 255
|
- VOID
|
Return
|
|
PWMEnable
|
Enable a PWM output
|
- BYTE
|
Channel
|
Range: 0-15
|
- VOID
|
Return
|
|
ADCSampleArray10
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 32
|
- UINT
|
SampleDelay
|
Delay in us between each sample
|
- UINT
|
Samples
|
10-bit samples returned from the function
|
- VOID
|
Return
|
|
ADCSampleAverage8
|
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
|
- BYTE
|
ADCChannel
|
Range: 0-5
|
- BYTE
|
SampleCount
|
Range: 1- 100
|
- BYTE
|
SampleDelay
|
Delay in us between each sample
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the comms to the Arduino board ready for commands to be sent.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Connection
|
|
COM Port
|
Lists all the current available COM port hardware on your PC.
|
|
Refresh Ports
|
|
|
API Peripherals
|
|
Digital IO
|
|
|
Analog Input
|
|
|
Analog Output
|
|
|
PWM Output
|
|
|
I2C Bus
|
|
|
SPI Bus
|
|
|
UART
|
|
|
Servo
|
|
|
Console
|
|
Console Log
|
Create an automatic console log of the commands sent to the Arduino
|
|
Log Mode
|
Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns
|