My end goal is to create a simple aquarium controller with an Arduino mega that will handle the lights, check temperature and eventually monitor ph and other stats of a small 5 gallon tank. I want to use SmartThings to send the information to the cloud and allow me to make setting adjustments.
I have a DS18B20 temperature probe that I am using to check the water temperature. The probe uses the 1-Wire Protocol which I’ve gotten to work successfully using the OneWire library. I have been able to use the sendSmartString() function in the loop to send the temperature to smartthings. While this works, it is not very elegant as I can not control how often it sends information and I think it conflicts with how other messages are being sent. I believe the right way to go about adding the probe would be to create a library similar to ST_Anything_temperaturehumidity used for the DHT22 sensor so I can control the polling interval and offset.
Does anyone have any suggestions on where to start with creating a library for 1-Wire devices that is compatible with the ST_Anything library?