MATLAB Answers

Raspberry Pi read GPIO signals in Simulink

14 views (last 30 days)
C H
C H on 16 Aug 2017
Commented: Riccardo Minati on 23 Feb 2019
Hi,
I wanted to read the signals coming from a DTH11 or DTH22 sensor, which is connected to my RasPi via GPIO. Do I have to install the sensor-library first to get plausible values in simulinks "GPIO read"?
Thanks, Christoph

  1 Comment

Sign in to comment.

Answers (1)

Gayatri Menon
Gayatri Menon on 23 Aug 2017
Hey, DHT22 or DHT11 sensor signal is 40bits. Using just the GPIO Read block won't suffice. You can consider creating a Device Driver block in Simulink for the same. The following link will help you create Driver block: https://www.mathworks.com/help/supportpkg/raspberrypi/device-driver-blocks.html
Hope that helps!

  1 Comment

Riccardo Minati
Riccardo Minati on 23 Feb 2019
Why using GPIO Read block won't work?

Sign in to comment.

Sign in to answer this question.