Load them up — 5 (DS18B20) Temp Probes — SKETCH CRASHES September 10, 2011
Posted by rik94566 in aquaponic automation, aquaponics, arduino, CAT 5 Cable, CEA, Controlled Environment Agriculture, Crop, DIY aquaponics, DS18B20, indoor aquaponics, indoor gardens, indoor growing, Sensor Hub, Stainless Steel Temp Probe, Temperature Probe.Tags: aquaponic automation, aquaponics, arduino, arduino sketch, automation, CAT 5 cable, DIY aquaponics, DS18B20, indoor aquaponics, indoors aquaponics, microcontroller, Miles Burton, rik kretzinger, sensor, Temp Probe, Temperature Probe
trackback
Well I got it together now and fired everything up — and the sketch crashed… Here are the details of what it looked like.
I put the 5 probe sketch I was using up on google docs and made it available at this link:
If you have a problem with the sketch just email me at rik94566@gmail.com and I will send the sketch to you.
Here is what it looks like as it was coded:
Here is the result when I ran the sketch:
Interesting thing is that I worked my way up from 1 probe to 5 probes. Before I started I checked all slots on the harness to make sure there would be no problems with the connections. Everything worked fine through 4 probes. Here is what it looked like running 4 probes.
Now the fun begins.. get to figure out why this does not work with 5 probes. Found out some other things about deviceIndex while I was loading up all the probes. Will blog about that next and present concepts that help drive the One-wire protocols.
There is a built in function that’s included in the Dallas Library to convert to Fahrenheit try this:
DallasTemperature::toFahrenheit(sensors.getTempCByIndex(i))
So there is no need to run extra math on each conversion 😉 I would say this function is probably more efficient..
Jason – thanks for this information. I was not aware this function was in the library. You are right it will cut memory overhead on some of the arduinos. Thanks for sharing and helping people learn about DS18B20’s.