By Jacques Gangloff
RPIt stands for “Raspberry PI Simulink Coder target”. It is an independent project that targets the Raspberry Pi (RPI) embedded platform from the Matlab/Simulink environment using Simulink’s external mode feature.
The Simulink model is automatically converted into C code, transferred to the RPI, compiled directly on the RPI (no cross-compilation), the executable is launched on the RPI and a TCPIP connection is started between Simulink and the RPI. The executable runs on Linux using standard Unix timing mechanisms. Thus it is soft real-time though the measured jitter is around 100 microseconds. The communication between the RPI and Simulink is asynchronous. It allows for on-the-fly parameters tuning and measurements visualization thanks to live scopes.
The provided blockset includes an “EV3” block for interfacing with the Lego EV3 brick. The EV3 brick is connected to the RPI with USB. The dialog between the RPI and the EV3 uses bytecodes understandable by the virtual machine implemented on Lego’s original firmware. All actuators and sensors are supported by this block. IMU devices, like the MPU9150, directly connected to the RPI with I2C, are also supported by this blockset. The source code of RPIt is totally open. It is independent from Mathworks’ Raspberry Pi target and thus does not interfere with it.
For more information and updates, check out the project’s homepage.