From the minds of http://arduinotronics.blogspot.com

UPDATE: Added our SpeakEasy Text-To-Speech (TTS) Shield to make this a "Talking" Weather Station!

UPDATE: Added a 4 port relay board for device control

UPDATE: Added Dew Point and Heat Index calculations

SainSmart sent me a 1.8" TFT LCD (ST7735R), and I decided to upgrade my Weather Station / Thermostat. This time around, I used the slightly less accurate but much less expensive DHT-22 (AM2302) temperature / humidity sensor. I also received a BMP-085 barometric pressure sensor, but it appears dead. More on that in the near future. Tighten your seat belt, and here we go:


Arduino Uno
10k Ohm Resistor
Relay Board (optional)
Male / Female Jumpers (very helpful)

Step 1: Connections

Connect the DHT-22 sensor and the LCD display as per the schematic. There are also connections on the left side of the display for the SD card, and we will address that at a future edit for logging purposes. Just use the connections on the right side of the display for now.


(S)ignal to Arduino Pin 2
+5 to Arduino +5vdc
G to Arduino Ground
10k Resistor between S and +5vdc

ST7735R LCD:

VCC to Arduino +5vdc
Gnd to Arduino Ground
SCL to Ardiuino Pin 13
SDA to Arduino Pin 11
CS to Arduino Pin 10
DC to Arduino Pin 9
Reset to Arduino Pin 8

<p>This looks like a great item that will be used a lot Thanks</p>
<p>Hi, </p><p>I was having the same problem as madmoonfish was having, and I don't understand where to get the DHT library. If you could help me out, that would be great!</p>
Just updated the code page with the link to the DHT library, and fixed the 3 includes that did not paste properly.
can you please tell me what to include, sketch is saying error class tft has no member named background, stroke, text in various sections of t he code.<br>Ive installed the gfx amd st7735 libraries but im just not too sure how to make them work, the errors look like to not me, im missing a library or something! ? im not sure.<br> Please help!<br>Im going to use this for an automated greenhouse. :-)<br>my screen came in the mail today but all I get is a white backlight :-(
<p>&lt; and &gt; symbols get dropped when pasting in the code. Went back and fixed.</p><p>#include &lt;SPI.h&gt;</p><p>#include &lt;ST7735.h&gt;</p>
I forgot to ask, in the code for your screen I noticed your using BLACKTAB witch is the S version, but you talk about using the R version witch is the screen I ordered wich is GREENTAB I think there is also a BLUETAB version that they sell.<br>do I just replace BLACKTAB with GREENTAB in the code?<br>thank you for your help, its very much appreciated. :-)
<p>I went back and looked at my code, and don't see &quot;blacktab&quot;, &quot;greentab&quot; etc. what line of code are you referring to? The code should work on any ST7735</p>
im sorry that is from another code, ignore that. very sorry for the confusion. <br>ill try the updated code soon. if it still doesn't work ill reinstall the IDE
thank you very much for replying, ill try it in a few hours.<br>my back went out thismorning so cant sit, wish there was a sketch download link.<br>if its not too much to ask can you please email me the code?<br>thank you. once again
Yep, <br>That did the trick! <br>Glad to see that my display is working properly. <br>Many thanks for the write up!
Sorry for the confusion. I need a version control system :-)
<p>I'm trying to put this together and have a bit of a problem in the wiring. </p><p>In the code talking about the TFT the following pin assignments are mentioned:</p><p>CS to Arduino Pin 10<br><br>DC to Arduino Pin 9<br><br>Reset to Arduino Pin 8</p><p><br></p><p>and from this link talking about the relay <a href="http://arduinotronics.blogspot.com/2013/01/working-with-sainsmart-5v-relay-board.html" rel="nofollow">http://arduinotronics.blogspot.com/2013/01/working-with-sainsmart-5v-relay-board.html</a></p><p><br></p><p>the following code is given:</p><p>int relayPin2 = 8; // IN2 connected to digital pin 8</p><p>int relayPin3 = 9; // IN3 connected to digital pin 9</p><p>int relayPin4 = 10; // IN3 connected to digital pin 10</p><p>are these two sharing the same pins?</p>
<p>Change the relay pins to whatever pins you have available.</p>
<p>Okay, how would I hook the pressure sensor up to this project. Where would it go into the sketch?</p>
<p>Hello again,</p><p>Although my sensor is working and I am receiving accurate info, the screen is real dim, nothing like in your video. Is this something you would know how to fix?</p><p>Many thanks</p>
check your brightness and contrast resistors.
<p>Hi. I was wondering if you can help me. I am planning on using this (minus talking part) for a homemade incubator. Am trying to set-up the code, but I get an error. The part hi-lighted is &quot;DHT dht(DHTPIN, DHTTYPE);&quot; with the error &quot;'DHT' does not name the type.&quot; I would be grateful for your thought, as search this problem has come up with no easy fix.</p><p> Great and inspiring instructable!</p>
Sounds like you are missing the dht library.
<p>Updated the code with a link to the libray, and fixed the 3 includes that did not paste properly.</p>
<p>Aargh! I thought they were ok as they were showing up in my library. I even tried 3 different DHT libraries previously (which all showed up!) So what did was updated my arduino software to current version. Re-done the dht sensor files and now all works fab! Thanks very much! Just need to setup my relays and all will be up and running. Thanks again :D</p>
Ok, something seems to be wrong! <br>You are showing CS, DC an RST to be pins 10,9 and 8. <br>In your code CS=10, DC=11 and RST =13 <br>Also ,are the SCL clock and SDA data line coded from the libraries. <br>When I scope 13 it does not seem to be reset because it popping like a clock signal! <br>Very confused!!
Good catch. Originally, we did software SPI (any pins can be used), then switched to hardware SPI (for faster performance), and forgot to update parts of the instructable. All should be fixed now.
Do I need to call the different code examples any particular name....kinda new at this...thanks
any name you would like, within arduino naming conventions.
Ask previous question about naming requirements of programs as haven't done this much and now I'm confused with how do you load all 4 programs to get everything to work? Any help appreciated...thanks
to load a sketch on an arduino, you use the arduino IDE, open the sketch to upload or type the code, and click the upload button. you can only have one sketch loaded at a time. Learning to use the Arduino IDE is beyond the scope of this tutorial. See <a href="http://arduino.cc/en/Guide/HomePage" rel="nofollow">http://arduino.cc/en/Guide/HomePage</a>
Thanks sspence for the reply....I do understand that only one sketch can be loaded at a time but I'm trying to use all the features of this project with the relay and don't know how one accomplishes this.....any suggestions?
yes, you add the various features to one big sketch, like I did in the tutorial.
<p>I've looked at doing this but I'm just not a programmer so I don't know how to pull this off.....thanks for your replies</p>
tank you veryyyyyyyyyyyyyyy much

About This Instructable




Bio: Professionally, I'm an IT Engineer (Executive Level) and Electronics Tech. I'm a Amateur Radio Operator (KK4HFJ). I lived off grid, with Solar (PV ... More »
More by sspence:DIY I2C LCD Display with Inputs Raspberry Pi & the Neo 6M GPS Earthquake / Vibration Sensor 
Add instructable to: