Robobot teensy firmware
Back to Robobot
Teensy firmware
The board and the primary functional modules.
Interface
Sensor data are available on a subscription basis, e.g. to get gyro data every 50 ms use:
sub gyro 50 ;39gyro 0.122865 0.040497 -0.355164 14948.748 ;27gyro -0.151793 -0.051056 -0.233093 14948.799 ;27gyro -0.060240 -0.295197 -0.172058 14948.848 ;51gyro 0.092348 0.162567 -0.294128 14948.897 ;27gyro -0.121275 -0.020538 -0.385681 14948.948 ;25gyro -0.029723 -0.234161 -0.233093 14948.998
All subscriptions start with sub followed by the keyword for the data and ending with the data interval in ms. The fastest update rate is determined by the update rate of the Teensy, typically 2ms.
The USB interface can handle about 4000 messages per second.
The data is always preceded with three characters ';99', a simple validity check to ensure half messages are not used (e.g. if the interface is overloaded). The teensy_interface will check and remove these characters.
The remaining part is the data preceded with a unique keyword (here gyro). The data string is sometimes extended with additional (debug) data, here the 4th value is a timestamp (Teensy time).