Component: API (Interface Board) (API Slave Devices)
Author | Matrix TSL |
Version | 1.0 |
Category | API Slave Devices |
Contents
API (Interface Board) component
Connects to an Interface Board 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 / PWM / UART / DAC / Servo See Instructables for open source project files.
Detailed description
No detailed description exists yet for this component
Examples
Direct Slave Access
Here is a simple demo to switch on and off digital pin 5.
Rapid Development - Virtualised SPI
A feature of the App Developer Slave interface is to use the component for rapid development.
The App Developer Slave hardware can be used to take communications from the Flowcode simulation and transfer them to a real world device allowing for easy code generation and test without having to download to a target microcontroller device.
The CS pin and SPI Prescaler are set via the properties of the Injector component.
The SPI Master component is linked to the Injector component via the Injector property.
The Injector component is linked to the App Developer Slave component via the App Developer Slave property.
Interface Board App Developer Slave SPI Demo
Rapid Development - Virtualised I2C
A feature of the App Developer Slave interface is to use the component for rapid development.
The App Developer Slave hardware can be used to take communications from the Flowcode simulation and transfer them to a real world device allowing for easy code generation and test without having to download to a target microcontroller device.
The I2C Master component is linked to the Injector component via the Injector property.
The Injector component is linked to the App Developer Slave component via the App Developer Slave property.
Interface Board App Developer Slave I2C Demo
Rapid Development - Virtualised UART
A feature of the App Developer Slave interface is to use the component for rapid development.
The App Developer Slave hardware can be used to take communications from the Flowcode simulation and transfer them to a real world device allowing for easy code generation and test without having to download to a target microcontroller device.
The Baud rate and optional RS485 Properties are set via the properties of the Injector component.
The UART component is linked to the Injector component via the Injector property.
The Injector component is linked to the App Developer Slave component via the App Developer Slave property.
Interface Board App Developer Slave UART Demo
Downloadable macro reference
![]() |
I2CInitialise |
Initialsie the I2C module ready for communications | |
![]() |
Channel |
Channel Index: Range 0 - I2C Bus Count - 1 | |
![]() |
Baud |
0=100KHz, 1=400KHz, 2=1MHz | |
![]() |
Return |
![]() |
IOGetInputPin |
Sets the selected digital pin to an input and reads the input state. | |
![]() |
Pin |
Range: 0-17 | |
![]() |
Return |
![]() |
ADCSample8 |
Reads the voltage present on an Alanog pin as an 8-bit value range 0-255 | |
![]() |
ADCChannel |
Range: 0-5 | |
![]() |
Return |
![]() |
UARTInitialise |
Initialise the UART module ready for communications | |
![]() |
Channel |
Channel Index: Range 0 - UART Bus Count - 1 | |
![]() |
Return |
![]() |
UARTCheckRX |
Check to see if the UART module has received any data | |
![]() |
Channel |
Channel Index: Range 0 - UART Bus Count - 1 | |
![]() |
Return |
![]() |
I2CRestart |
Put the I2C Module into Restart mode | |
![]() |
Channel |
Channel Index: Range 0 - I2C Bus Count - 1 | |
![]() |
Return |
![]() |
WIFIIsConnected |
Checks to see if the WIFI is active and connected | |
![]() |
Return |
![]() |
PWMDisable |
Disable a PWM output | |
![]() |
Channel |
Range: 0-1 | |
![]() |
Return |
![]() |
I2CStart |
Put the I2C Module into Start mode | |
![]() |
Channel |
Channel Index: Range 0 - I2C Bus Count - 1 | |
![]() |
Return |
![]() |
SPITransfer |
Transfer a byte using the SPI bus | |
![]() |
Channel |
Channel Index: Range 0 - SPI Bus Count - 1 | |
![]() |
DataOut |
![]() |
Return |
![]() |
I2CReceive |
Receive a byte using the I2C bus | |
![]() |
Channel |
Channel Index: Range 0 - I2C Bus Count - 1 | |
![]() |
Last |
Last byte to receive: Range 0-1 | |
![]() |
Return |
![]() |
I2CStop |
Put the I2C Module into Stop mode | |
![]() |
Channel |
![]() |
Return |
![]() |
ServoDisable |
Disable a Servo output | |
![]() |
Channel |
Range: 0-5 | |
![]() |
Return |
![]() |
SPIPrescaler |
Modify the speed of the SPI bus | |
![]() |
Channel |
Channel Index: Range 0 - SPI Bus Count - 1 | |
![]() |
Prescaler |
Range: 0-2 | |
![]() |
Return |
![]() |
ServoEnable |
Enable a Servo output | |
![]() |
Channel |
Range: 0-5 | |
![]() |
Return |
![]() |
ADCSample10 |
Reads the voltage present on an Alanog pin as an 10-bit value range 0-1023 | |
![]() |
ADCChannel |
Range: 0-5 | |
![]() |
Return |
![]() |
IOSetOutputPin |
Sets the selected digital pin to an output and assigns the output state. | |
![]() |
Pin |
Range: 0-17 | |
![]() |
State |
Range: 0-1 | |
![]() |
Return |
![]() |
ServoSetPosition8 |
Sets the position as an 8-bit value | |
![]() |
Channel |
Range: 0-1 | |
![]() |
Position |
Range: 0-255 | |
![]() |
Return |
![]() |
UARTReceive |
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. | |
![]() |
Channel |
Channel Index: Range 0 - UART Bus Count - 1 | |
![]() |
Return |
![]() |
SPIInitialise |
Initialsie the SPI module ready for communications | |
![]() |
Channel |
Channel Index: Range 0 - SPI Bus Count - 1 | |
![]() |
Return |
![]() |
WIFIGetIP |
Gets the IP address of the board. Allows you to setup and get the assigned address via USB before using over WIFI, Use the WIFIIsConnected first to check the WIFI is active. | |
![]() |
Return |
![]() |
I2CSend |
Transmit a byte using the I2C bus | |
![]() |
Channel |
Channel Index: Range 0 - I2C Bus Count - 1 | |
![]() |
DataOut |
![]() |
Return |
![]() |
UARTSend |
Send a byte via the UART module | |
![]() |
Channel |
Channel Index: Range 0 - UART Bus Count - 1 | |
![]() |
Data |
Data Byte to send. Range: 0-255 | |
![]() |
Return |
![]() |
PWMSetPrescaler |
Sets the prescaler for the PWM output | |
![]() |
Prescaler |
![]() |
Return |
![]() |
PWMSetDuty8 |
Sets the duty for the PWM output | |
![]() |
Channel |
Range: 0-1 | |
![]() |
Duty |
Range: 0-255 | |
![]() |
Return |
![]() |
PWMEnable |
Enable a PWM output | |
![]() |
Channel |
Range: 0-1 | |
![]() |
Return |
![]() |
Initialise |
Initialise the comms to the Arduino board ready for commands to be sent. | |
![]() |
Return |