mightymos / ReedTripRadio

Alternative firmware for wireless 433MHz door/window reed sensors triggered by magnetic contacts.
BSD 2-Clause "Simplified" License
153 stars 7 forks source link

ds18b20 support via removing the led #6

Open wired-dev opened 1 year ago

wired-dev commented 1 year ago

could i get some help implementing this. it would be for the 4k version. ty

https://www.analog.com/media/en/technical-documentation/data-sheets/ds18b20.pdf

mightymos commented 1 year ago

Hi, I have used this sensor previously but do not have one available right now. Also adding support for serial or one wire communication would need to be done in such a way that it was not compiled in by default to keep the default hex file under 1KB.

Or maybe the makefile can produce two hex versions including one for 4KB flash code size.

I would like to help eventually but you might have to try yourself and possibly submit a pull request.

The HAL for these STC microcontrollers does contain a driver for this sensor: https://github.com/area-8051/uni-STC/tree/main/drivers/DS18B20

I haven't thought through what circuit modifications might be required, if any.

wired-dev commented 1 year ago

looks like might need to add some resistance in between R1 and P3_1, then attach the 1wire bus to P3_1 and it should work. Current resistor is 2.2k or so recommended pullup is 4.7k

wired-dev commented 1 year ago

https://github.com/pilight/pilight/blob/master/libs/pilight/protocols/433.92/auriol.c could use this protocol for it; could do battery low at same time