WOLFRAM SYSTEM MODELER
This example shows how to use a board with a custom version of Firmata. The Teensy board works perfectly with the StandardFirmata, but in this example it is modified in order get a faster data transfer speed.
The main difference of the CustomFirmata component is that it allows you to set the baud rate to the sampling interval that you want to use. In this case the oce of the StandardFirmata is modified to use a baud rate of 115200. You can perform this modification in the source code. Search for the line:
and change it to
This initializes the serial port at the given speed. The next change that you can make is reducing the minimum sampling interval. You can find this tweak by searching in the code for the text:
#define MINIMUM_SAMPLING_INTERVAL 10
and changing it to
#define MINIMUM_SAMPLING_INTERVAL 1
This changes the sampling interval limit from 10 ms to 1ms. This change is possible as the Teensy board can run up to 96 MHz. Whenever changing the sampling interval you also need to ensure that the sampling interval in Simulation Center matches it, as shown in the figure below.