I am new to working with Raspberry Pi physical computing. I have a Raspberry Pi and am trying to write a simple Python program to print the temperature and humidity data to the log. I have a DHT11 sensor plugged into 3V3, ground, and the data connected to GPIO pin 14. Here is the code I have so far:
#!/usr/bin/env python
from gpiozero import InputDevice
print(InputDevice(14, False))
However, all this prints is:
<gpiozero.InputDevice object on pin GPIO14, pull_up=False, is_active=False>
I'm not sure if it was wrong to use 'InputDevice' or really which direction to go from here. I just want to be able to read the temp and humidity. Thank you for any advice.
x = InputDevice(14, False)
and later something likeprint( x.some_function() )
– furas