Sets up hardware interfaces (GPIO, I2C, SPI) that talk to a remote board running Firmata, all multiplexed over one FirmataTransport.
More...
#include <HardwareSetupFIR.h>
Sets up hardware interfaces (GPIO, I2C, SPI) that talk to a remote board running Firmata, all multiplexed over one FirmataTransport.
Unlike HardwareSetupRPI/HardwareSetupFTDI, which reach local hardware directly, Firmata needs a Stream connected to the remote device - so begin() takes one, instead of being callable with no arguments.
- Note
- GPIO and I2C work against plain StandardFirmata. SPI requires the remote device to run ConfigurableFirmata with its Spi feature enabled (see HardwareSPI_FIR.h).
◆ HardwareSetupFIRMATA()
| arduino::HardwareSetupFIRMATA::HardwareSetupFIRMATA |
( |
uint8_t | spiDeviceId, |
|
|
int8_t | spiCsPin = -1 ) |
|
inlineexplicit |
- Parameters
-
| spiDeviceId | Device identifier used for SPI_DEVICE_CONFIG; low 2 bits must be 0. Only relevant if SPI is used. |
| spiCsPin | Remote-device pin number to use as chip-select, or -1 to toggle CS externally via GPIO. |
◆ begin()
| bool arduino::HardwareSetupFIRMATA::begin |
( |
Stream & | stream, |
|
|
bool | asDefault = true ) |
|
inline |
Start the shared Firmata transport and all three backends.
- Parameters
-
| stream | Already-opened stream connected to the Firmata device. |
| asDefault | If true, sets up global Arduino objects (Wire, SPI, GPIO) |
- Returns
- true if initialization successful, false otherwise
◆ getGPIO()
◆ getI2C()
◆ getSPI()
The documentation for this class was generated from the following file: