Help me with DHT11 sensor!!!
-
When i wanna use dht11 with my onion omega 2+, its give me only -255 value for all pins. Also i tried use 5v and 3.3v . Scheme and my terminal below. In Scheme i just use pin 1 instead 19 , and dht11 instead dht22
-
Using the Expansion Dock with Omega2, running FW, 0.3.2 b233.
Please see the image that shows the termination of pins. Let us choose PWM CH1, marked as pin 19. Let us check the current GPIO configuration.
root@Omega-CCC9:/# omega2-ctrl gpiomux get
Group i2c - [i2c] gpio
Group uart0 - [uart] gpio
Group uart1 - [uart] gpio pwm01
Group uart2 - [uart] gpio pwm23
Group pwm0 - [pwm] gpio
Group pwm1 - [pwm] gpio
Group refclk - refclk [gpio]
Group spi_s - spi_s [gpio] pwm01_uart2
Group spi_cs1 - [spi_cs1] gpio refclk
Group i2s - i2s [gpio] pcm
Group ephy - [ephy] gpio
Group wled - wled [gpio]
=>pwm1 is configured for pwm
root@Omega-CCC9:/# dht-sensor 19 DHT11
humidity: -255.000000
temperature: -255.000000
=>We get the wrong readings. Let us reconfigure pwm1..
root@Omega-CCC9:/# omega2-ctrl gpiomux set pwm1 gpio
set gpiomux pwm1 -> gpio
=>And verify pwm1 has changed to gpio.
root@Omega-CCC9:/# omega2-ctrl gpiomux get
Group i2c - [i2c] gpio
Group uart0 - [uart] gpio
Group uart1 - [uart] gpio pwm01
Group uart2 - [uart] gpio pwm23
Group pwm0 - [pwm] gpio
Group pwm1 - pwm [gpio]
Group refclk - refclk [gpio]
Group spi_s - spi_s [gpio] pwm01_uart2
Group spi_cs1 - [spi_cs1] gpio refclk
Group i2s - i2s [gpio] pcm
Group ephy - [ephy] gpio
Group wled - wled [gpio]
=>Let us try again..
root@Omega-CCC9:/# dht-sensor 19 DHT11
humidity: 87.000000
temperature: 28.000000
=> Put the pwm1 back to pwm
root@Omega-CCC9:/# omega2-ctrl gpiomux set pwm1 pwm
set gpiomux pwm1 -> pwm
=> And try..
root@Omega-CCC9:/# dht-sensor 19 DHT11
humidity: -255.000000
temperature: -255.000000
=>Once again, put pwm1 to gpio.
root@Omega-CCC9:/# omega2-ctrl gpiomux set pwm1 gpio
set gpiomux pwm1 -> gpio
root@Omega-CCC9:/# dht-sensor 19 DHT11
humidity: 87.000000
temperature: 28.000000
=> Try DHT22
root@Omega-CCC9:/# dht-sensor 19 DHT22
humidity: -255.000000
temperature: -255.000000The DHT11 usually have 3v-5v operating range, with 5v5 specified as the max voltage. I used 3v3, not 5v; using 5v would probably damage the 3v3 inputs of Omega2. Also, the DHT11 I have already has the pull-up built onto the assy.
Note: I have only 3 days hands-on with Omega. I could be wrong in the commands and config above.