Below the break is revision 4. Read the comments in the code. I’ll post a formal description of the software’s behavior soon.
After a long wait here’s version 2.0 of the Tri-Temp Standard code. What changed? Lots.
- Button response is now very very fast.
- Button to toggle C/F temp measurements
- Temp reading is updated by interrupt timer. Approx every 5 sec.
- Code is documented
- Two new libraries needed – avr/interrupt.h and TimerOne.h
Here’s the code:
The TMP36 was my first sensor and is pretty simple. 3 pins, 1 analog port.
Available from SparkFun.
It’s a low voltage temperature sensor. It provides a voltage output that is linearly proportional to the Celsius temperature. It also doesn’t require any external calibration to provide a typical accuracy of ±1°C at +25°C and ±2°C over the −40°C to +125°C temperature range. Give the it a ground and 2.7 to 5.5 VDC and read the voltage on the Vout pin. The output voltage can be converted to temperature easily using the scale factor of 10 mV/°C. For Example:
On my last project– which still isn’t done yet- the buttons for changing the temp display are very unresponsive.
The reason of course is because the Arduino has to loop through all the main code before getting around to checking the button status.
I found the cure! Interrupts!
This is the first version of the Tri-Temp code. If you find any errors or add any features let me know so I can update it. Continue reading “Tri-Temp Standard Code v1.0”
This is the Tri-Temp project. It comes in two flavors- Standard and Ethernet. The Standard version outputs all readings on an LCD. The Ethernet adds output to HTML via a web browser. I did not design this to use an Ethernet shield- only the Arduino Ethernet- it’s more compact.So what’s this all about? Reading the Temp and Humidity! Nothing special going on here, just reading the digital data from three DHT22 sensors and displaying it.
I hacked this DHT11 together today to show the outside temp/humidity. I normally test output to the Serial port but this time I did LCD and serial. The clear case is a case from Maker Shed. Eventually all this will fit inside the box but until I’m satisfied I’m gonna let it hang…
Below is the code. I added the Dew Point in F.