首页 > 代码库 > Configure Pi as simulation hardware for Simulink

Configure Pi as simulation hardware for Simulink

1. Only version not older than R2013 supports Raspberry Pi. First, download support package in Matlab:

http://www.mathworks.cn/matlabcentral/fx_files/40313/5/raspberrypi.zip

2. Open raspberrypi.mlpkginstall in Matlab, and just follow the instructions, you will get everything ready.

matlab_pi_1

3. After installation, get your Pi connected into the router in your home, and remember the IP address in management page, because Matlab connecting Pi via SSH.

4. Open Simulink in Matlab, add a new model, configure SinWave and Gain.

pi_test

5. Open Model Configuration Parameters, or Ctrl+E.

config

Configure the IP address , user name is pi, password is raspberry.

6. Configure simulation, time is inf, device is External.

external

7. Run it.

run