Raspberry Pi 3 B Simulink Sensor Implementation SPI
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I need help to implement an angle sensor AMT203 CUI on a raspberrypi 3b using Matlab Simulink. Do I have to unlock the SPI Pins first in the Command Window? Which Simulink blocks do I use to read data from those pins, SPI register read, or GPIO read?
0 件のコメント
回答 (1 件)
Prasanth Sunkara
2020 年 7 月 23 日
Hello Ferdinand,
If you are working with a SPI sensor, you should have the SPI module enabled. In most cases, SPI module(and the SPI pins) are enabled by default. You can check this using raspi-config.
You can directly use the SPI blocks to interact with the sensor.
For reference, please see the below links.
SPI example: https://www.mathworks.com/help/supportpkg/raspberrypi/ref/communicating-with-an-eeprom.html
Hope this helps!
Thanks,
Prasanth
2 件のコメント
Prasanth Sunkara
2020 年 7 月 30 日
Sorry for the late reply. Yes, those values can be found in the sensor's datasheet.
Thanks,
Prasanth
参考
カテゴリ
Help Center および File Exchange で Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!