This code is just to see if I could get the temp sensor to read and then do something with it, so it's pretty ugly code and probably not even what I'll use for a basis. Tdhempy wrote:So did the LED light up too? Over what period are those temp readings (maybe you could add a timestamp to the Serial.print statements.
How are you connected to the PC .. serial (RS232?)
Dan
here is a built-in LED on pin13 on this version of the Arduino and yes it lights to indicate the solenoid is on.
That output is at 1-second sampling. This line:
Code: Select all
delay(1000); // maybe 750ms is enough, maybe not
// we might do a ds.depower() here, but the reset will take care of it.
delays the second, so that's the only delay in the code. The DS18B20 is very fast. The temperature was changed by just grabbing it between my fingers for a few seconds, you can see how fast it reacts. The resolution is scalable but default is 12 bit or 0.0625*.
I'm still going to play with the thermistors I have just to see which I like better and which method has less code overhead. Tonight I'll try breadboarding that up.
One idea I like about these DS chips is that 8 can be run on the same pair of wires. So I could make a temp probe for the mash that could have a sensor every 2" and get an average of the mash instead of reading a single hot or cold spot.
Oh and this version of the Arduino uses a USB interface which also powers it up.