[sclug] thermometer accessory for my raspberry pi
Sean Furey
sean-lists-sclug at furey.me.uk
Thu Aug 9 11:21:01 UTC 2012
While it doesn't explicitly mention a pull-up resistor, I'm fairly
certain it will need one. It's been a while since I've done any of
this, but hopefully someone will correct me if I've misremembered any
of it...
Attach one end of a largish resistor to the signal line between the
device and GPIO. I'm being deliberately vague about "largish", 1MOhm
springs to mind as a reasonable value, maybe someone else can confirm?
When actually using this from the Pi side, never output a '1'. If you
want the line to be high, configure the GPIO pin as an input, the
resistor will pull it up. If you want it low, configure it as an
output, setting it to '0'.
Timing might be fun for this, as I think you're going to need to be
polling quite rapidly to measure the lengths of pulse to distinguish
'1' vs '0' from the device. If you're looking at other peripherals to
wire up, I2C is somewhat easier here, as the master (Pi in this case)
supplies the clock, so it can go at whatever speed works for you.
*waits for laughter from someone who actually works on electronics*
Sean
On Thu, Aug 09, 2012 at 08:40:03AM +0100, Chris Couzens wrote:
> Hi,
>
> A couple of you were asking about the thermometer I couldn't get working with my Raspberry Pi.
>
> Here is the spec sheet.
>
> http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Weather/RHT03.pdf
>
> If you're wondering what the GPIO (General Purpose Input Output) API is like for the Raspberry Pi (and other Linux computers), here is the code to my Raspberry Pi single digit display.
>
> https://github.com/ccouzens/raspberry_pi_led
>
> Chris Couzens
More information about the Sclug
mailing list