gw.sleep on battery powered magnet door switch
-
@siod
@Nicklas-Starkel said:put a 1MOhm resistor between VCC and PIN2.
This is used as a pull-up resistor to keep the signal to PIN2 active HIGH until the reed switch is closed.
I have never tested and don't know how much of a difference it would make, but you can do the reverse of that too and connect it like this:
GND -- 1MOhm -- PIN2 -- Reed Switch -- VCCWith this setup PIN2 would stay active LOW and in your code you would check to see if it goes HIGH for the switch contact. My thought is that doing it with the resistor to VCC from PIN2, which would be active HIGH, would use a slight bit more power than keeping it active LOW with the resistor from PIN2 to GND . As I said, I have never tested this, so I may be wrong.
-
new observation: I have two temp nodes with red Htu21d in them. One keeps locking up randomly. Have to go outside and reset the arduino. I'll try another sensor today and see if it fixes things. Have completely rebuild the node twice now with new parts except the sensor.