Can I use the buffered inputs on the Automation pHAT for 1-Wire?


#1

Hi Team -

I wanted to hook up a ds18b20 temperature sensor to a Pi with an Automation pHAT . Can I use the buffered inputs for the data input? I really just wanted to use the screw headers and don’t want to extend the headers to add a single connection.

Thanks in advance,
HB


#2

no, that won’t work I’m afraid… but you can use the breakout on the left hand side, no need to use an extended header.


#3

Thanks for the quick response. I assume I can use the SPI/MISO pins and solder a 3-pin header across 3V, GND and this pin. Which broadcom pin does it map to - 19?


#4

it would be bcm9, see https://pinout.xyz


#5

Thanks! I just changed the 1Wire interface pin to bcm9 and it worked fine.

I was just peeking in the automation hat library, and I see there is no way to query the current status of the relays. I can only set and toggle the value. Can this functionality be added? In the meantime, I’m just reading the status of bcm13, which looks like the relay GPIO pin on the pHAT.

Cheers!
HB


#6

I’d imagine that that’s because the relays on Automation HAT/pHAT have both a normally open and normally closed side, so the definition of what is “on” or “off” will depend on which side you’re using, but @gadgetoid will confirm that.


#7

The docs define on/off, with ON meaning where the “normally open” state would be closed and the “normally closed” state would be open:

automationhat.relay.one.on()
automationhat.relay.one.off()
automationhat.relay.write(1) # 1 = ON, 0 = OFF

I’m just looking for a way to query what that state is.


#8

Hi, did you finish your project, be interested to hear all about it?