raspberry pi GPIO connect with simulink

2 vues (au cours des 30 derniers jours)
qi
qi le 3 Juil 2019
Commenté : qi le 3 Juil 2019
I have a dcdc model in simulink, I want to run the loop control algorithm on the raspberry pi. In other words, I need raspberry pi generate a siganl to control the dcdc model. When I try to use following method, I meet a problem "Do not assign the same GPIO number to multiple GPIO blocks in a model. ".so how to work this problem?
can i use different GPIO, and connect them through the wire on the raspberry pi board??
raspberry.jpg

Réponse acceptée

Andrey Kiselnikov
Andrey Kiselnikov le 3 Juil 2019
Hi, you should understand that GPIO is configurable hardware. When you are launching the model on Raspberry it compiles in executable, that is trying to configure the MCU port as input and output simultaneously, that is incorrect.
The proposed method - using different pins connected by a wire is a good solution.
Also, you can evaluate all accessible pins and their functions by command line or script :
%create the system object, sure that no other Matlab functions drive your PI
mypi = raspi;
% watch pin diagram
showPins(mypi)
% clear system object
clear mypi;
  1 commentaire
qi
qi le 3 Juil 2019
great! thank you for your reply!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Raspberry Pi Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by