Connect sensor to MangOH Green

I have following sensors: DHT11 (temperature + humidity) and: HC-SR501 (motion). Is it possible to connect these sensors directly to Mangoh board? Or it must be connected to an Arduino shield on Mangoh board?

Thanks.

It seems that the HC-SR501 is simply 5v, output and ground. So you just need to connect the output to a GPIO on the mangOH Green, configure the GPIO as an input and read it when you wan to check for movement.

The DHT11 is more complicated because it uses a non-standard protocol over one wire. Because it’s a one wire protocol, the timing requirements are a bit strict. I found a Rapsberry Pi & BeagleBone Black project for controlling a DHT11 from Python. In some ways this seems promising, but I looked at the code a bit and it seems that they are (at least for the BeagleBone) using memory-mapped GPIOs and manipulating the priority of the process to try to make the timing work. We have a Bosch bmp280 on the mangOH Red which is an I2C device that provides temperature and pressure. If you need humidity as well, there is the bme280. Devices like this are easier to work with from Linux. I’m sure there are many other sensors available as well. I just mentioned the Bosch ones because I’m somewhat familiar with them. If you do want to use the DHT11 and you are using the mangOH Green, then I think controlling the sensor from the Arduino will be your best option because there is already a lot of code on the internet showing how to control that sensor from Arduino.