I have finally got ATTiny85's working as 1-wire slaves but not using Markus' library, I used a modified version of the one wire library from
Alexander Gordeev . I finally succeeded once I discovered I could run the ATTiny85 at 16Mhz, that was the big breakthrough.
I now have ATTiny85s as slaves for a rain gauge and another for a humidity sensor. I am using the
PinChange Interrupt Library so that the slaves only process one-wire commands once a One Wire Reset is detected. An LED flashes to provide visual feedback when the slave sends sensor data. Like the DS18B20 I use 0x44 as a request to calculate the sensor data and 0xBE to return the results.
I am running an Arduino as the weather station and One wire Master with Serial Communication to a computer. I had problems once I started adding multiple ATTiny85s but a 100nF decoupling ceramic capacitor across the +5v and GND lines has fixed them. My currently setup includes . . .
- 1 x 4x20 LCD
- 1 x MPL115A1 SPI Barometer
- 1 x DS1904 One Wire Real Time Clock
- 4 x DS18B20 One Wire Temperature Sensors
- 1 x ATTiny85 One Wire Rain Gauge Sensor
- 2 x ATTiny85 One Wire Humidity Sensors
I have attached the modified library along with the slave code for the rain Gauge and Humidity Sensors. The Weather Station Sketch is a work in progress that I am willing to make available should anyone be interested.