Hello All, I am trying to implement a pulse counter on a RasPi 3 Model B using Simulink and send the count to ThingSpeak cloud using the ThingSpeak Write block.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have implemented the functionality using a polling mechanism (Model_02) and it works fine.
The model counts an edge rise on GPIO 20 and writes GPIO 21 with the value from GPIO 20.
Every minute the aggregated pulses are pushed to cloud using ThingSpeak write.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1638741/image.png)
However, when I try to implement the same functionality using interrupts (Model_10) the model fails to run on the hardware.
I have narrowed down the problem to the ThingSpeak write block. Commenting this block runs the code on the hardware.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1638746/image.png)
The red bounding box shows the functionality inside the function call subsystem.
I am attaching Model_02 and Model_10 for reference.
Any help as to why Model_10 fails to run is greatly appreciated.
Thank you.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Sources 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!