Firmata Device¶
Description¶
Interface to a microcontroller that supports the Firmata protocol.
Most Arduino boards and compatible devices (e.g. Teensy) can be configured to support the Firmata protocol via the Arduino Firmata library.
The device can be connected via a serial port or Bluetooth low energy (BLE). If both serial_port and bluetooth_local_name are omitted, MWorks looks for a single, connected serial device. If it finds one, it assumes it to be the desired Firmata device and attempts to connect.
Signature¶
iodevice/firmata
Optional Parameters¶
serial_port¶
Example: | /dev/cu.usbmodem31 |
---|
If the Firmata device is connected via a serial port, this parameter specifies the filesystem path that represents the serial port
bluetooth_local_name¶
Example: | FIRMATA |
---|
If the Firmata device is connected via Bluetooth low energy, this parameter specifies its local name
data_interval¶
Example: | 5ms |
---|
Sampling interval for analog inputs. Must be a whole number of milliseconds.
autostart¶
Default: | NO |
---|
If YES
, the device will start I/O automatically (as if by an
implicit Start IO Device action) when the experiment starts running.
Note: Device I/O will always stop automatically when the experiment stops running, irrespective of this setting.
alt¶
Alternative device to use if this one fails to initialize (e.g. because the required hardware is not available). If #allowAltFailover
is set to 0 or false, this parameter is ignored.
Placement¶
Allowed at top level: | Yes |
---|---|
Allowed parent: | Folder |
Allowed children: | Firmata Analog Input Channel, Firmata Analog Output Channel, Firmata Digital Input Channel, Firmata Digital Output Channel, Firmata Servo Channel |