Simulink model deployed on Raspberry Pi

1 view (last 30 days)
sebbesen
sebbesen on 8 Sep 2015
Answered: Jun on 6 Oct 2015
I have a Raspberry Pi B+ (RPi) with a CAN-bus interface. I want to send a message to the RPi from an external device through the CAN interface. On the RPi I want to have a Simulink model running which reads the incoming message and (depending on the message) returns another message to the external device over CAN.
Does anyone have an idea how to do this? At this point, I'm able to receive and send messages on the CAN bus from the Linux terminal (e.g. cansend, cansniffer, etc) by means of the tools "can-utils".
I reckon the process involves compiling the Simulink model to C code or some sort of stand-alone executable which takes the incoming CAN message as an input argument and broadcasts the appropriate message back on the CAN bus. Anyway, I'm a bit stuck at this point, and I'd be happy if anyone has some ideas to get me started.
Your comments are appreciated!

Answers (1)

Jun
Jun on 6 Oct 2015
you can write code use socket can in Linux.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!