loading
This is an Example of how you can use the Arduino to monitor various environmental parameters And display them on a LCD screen. 

Note: I Added a Real Time Clock!! To see the steps, added parts  and Sketch I added new steps..

Step 1: Parts List

Arduino uno R3 or compatible                                           30.00 
Sainsmart "1.8" TFT Color LCD Display                          18.50 
DHT11 Digital Temperature and Humidity Sensor        6.44 
Mini Breadboard                                                                    5.00 
Jumper Wire

<p>hi, i make a projet but i dont use display, i want use my phone like display, you can help me? <br>ty</p>
<p>Nice project!! Made it with the Arduino Micro</p>
<p>Thanks for the instructable! I changed the display a little and only used the DHT11 sensor. I have a different TFT display also.</p><p>Thanks!</p>
<p>can you tell me please the model of your TFT display? thank you</p>
Tontec 1.8&quot; TFT Color LCD Display Module SPI Interface MicroSD for Arduino UNO MEGA R3. I got it from amazon
<p>Is this possible to make with an Arduino Pro Mini to make it smaller? I am new at this. :D</p>
<p>*and portable.</p>
<p>Thank you so much for sharing your work! I am quite new to the electronics community, but thanks to people like yourself I learn more, and more each day. I just finished building this environment monitor, and already have plans for augmenting the system. Your Instructable is; well-constructed, clear, and concise. It was truly a pleasure following your lead, and I couldn't be more proud of the result. Thanks again for sharing, and keep up the good work!</p>
<p>Here is a new UART TFT LCD, it support the WYSIWYG editor to build your UI in PC and download it via USB. It can be control by Arduino via UART, so just use the Serial.print() you can make it display many images. And do't worry about the font ! You can build it yourself and download to the TFT LCD.</p><p>Its indigogo page here with detailed in introduce:Amazing price!! 10USD 2.4&quot; with free shipping.....</p><p><a href="https://www.indiegogo.com/projects/nextion-a-cost-effective-high-performance-tft-hmi/x/4283045" rel="nofollow">https://www.indiegogo.com/projects/nextion-a-cost-...</a></p><p>Here is 2 blogs about using the Arduino to build the UI tutorial:</p><p><a href="http://blog.iteadstudio.com/product-preview-nextion-in-an-arduino-project-2/" rel="nofollow">http://blog.iteadstudio.com/product-preview-nextio...</a></p><p><a href="http://blog.iteadstudio.com/product-preview-nextion-in-an-arduino-project-3/" rel="nofollow">http://blog.iteadstudio.com/product-preview-nextio...</a></p>
<p>I get the following error when running the example from the library to test the display(step 3)</p><p>avrdude: stk500_getsync(): not in sync: resp=0x30</p><p>Can anyone help me?</p>
love it, cant wait for the updates.<br>after reading this instructible I went ahead and ordered a screen and rtc as you mentioned.<br> I received my lcd 2 weeks ago, added a 4 port relay, moded code for the very first time!!( yay me haha raspberry pi helped a load!) and hooked it up to my 7x6x7 greenhouse for a week with lights and fans, it stayed at daytime a constant 28c (exactly what I set it!) and today I received my rtc :-), I cant wait to use the sd card!, how are you planning on viewing the log on the sd? button to flash screen would be cool.<br> thank you very much for your time and effort to make this public it is very much appreciated! <br><br><br>pictured is a very crude case but I ts all I had laying around.
<p>Hello, how to refresh the number on the screnn, but without refreshing the entire screen ?!</p>
<p>the code dose that now. give it a try.</p>
<p>Brilliant documentation, very clear instruction </p>
<p>Hello,</p><p>I have this problem, even if I place &quot;versalino.h&quot; in the same directory as the sketch * .ino.</p><p>This report would have more information with<br> &quot;Show verbose output during compilation&quot;<br> enabled in File &gt; Preferences.<br>Arduino: 1.0.6 (Windows Vista), Board: &quot;Arduino Uno&quot;<br>In file included from dht11.cpp:43:<br>dht11.h:66: error: 'VersalinoBUS' does not name a type<br>dht11.h:67: error: 'VersalinoBUS' has not been declared<br>dht11.h:73: error: 'VersalinoBUS' has not been declared<br>dht11.h:76: error: 'VersalinoBUS' has not been declared<br>dht11.h:80: error: 'VersalinoBUS' has not been declared<br>dht11.h:93: error: 'VersalinoBUS' does not name a type<br>dht11.cpp:59: error: 'VersalinoBUS' has not been declared<br>dht11.cpp:66: error: 'VersalinoBUS' has not been declared<br>dht11.cpp: In member function 'void dht11::attach(int, int)':<br>dht11.cpp:69: error: '_myBUS' was not declared in this scope<br>dht11.cpp: At global scope:<br>dht11.cpp:81: error: 'VersalinoBUS' does not name a type<br>dht11.cpp:91: error: variable or field 'setBUS' declared void<br>dht11.cpp:91: error: 'VersalinoBUS' was not declared in this scope<br>dht11.cpp: In member function 'int dht11::read()':<br>dht11.cpp:111: error: '_myBUS' was not declared in this scope<br>dht11.cpp: At global scope:<br>dht11.cpp:116: error: 'VersalinoBUS' has not been declared<br>dht11.cpp: In member function 'int dht11::read(int, int)':<br>dht11.cpp:118: error: request for member 'PINS' in 'myBUS', which is of non-class type 'int'</p>
<p>thank you so much finally was able to get my lcd screen to work!</p>
<p>HI everyone</p><p>I have a next problem when I try to compyle</p><p>C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In member function 'void Adafruit_ST7735::commonInit(const uint8_t*)':<br>C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:324: error: 'SPI' was not declared in this scope<br>C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:326: error: 'SPI_CLOCK_DIV4' was not declared in this scope<br>C:\Program Files (x86)\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:334: error: 'SPI_MODE0' was not declared in this scope</p>
<p>i am a software developer after reviewing these project i am big fan of Arduino and your's .. thanks a lot for nice share.. </p><p>in couple of days i am getting my board and other things as soon i do my first test m going to upload :) </p><p>thanks once again for lovely share.</p>
<p>Would it be possible to add a particle counter to this instructable? </p>
<p>yes, if you find one with an arduino compatible output... but I haven't seen. Any out there...</p>
<p>I dont really need the display, but I need to access the sensor values over the network so I can remotely monitor temp/humidity etc. Anyone know how to add networking to this so the temps can be read remotely? </p>
<p>check this instructable out, it might be what you're. Looking for:</p><p>http://www.instructables.com/id/Arduino-TempHumidity-with-LCD-and-Web-Interface/</p>
<p>Dear Jhon </p><p>That's a gr8 project you have built but after watching your vedio i wish to ask you why does the display on the lcd screen keeps on changing is there any way to keep it stable?</p><p>regards</p><p>sachin</p>
<p>yes the last update to the sketch only refreshes the numbers instead of clearing the entire screen</p>
<p>thnx dear John would I am looking forward to make after a few things done </p>
<p>thnx dear John would I am looking forward to make after a few things done </p>
This can help security personnel monitor a lot of additional useful stuff, at a glance, you could make a commercial version of this. Voted and went to my Blog: <br>http://faz-voce-mesmo.blogspot.pt/2013/06/robots-brava.html
Obrigado Edgar
<p>Hello.</p><p>The project remarkable, tell as to replace DHT11 sensor with the DS18S20 sensor, what it is necessary to change?</p>
Sempre &agrave;s ordens.<br>
:)<br>
<p>Hello.</p><p>The project remarkable, tell as to replace DHT11 sensor with the DS18S20 sensor what it is necessary to change?</p>
<p>I don't know if anyone else noticed but you need to change the graphicstest code example from adafruit to work with this display. Make sure you have the below at the beginning of the code. The code comes preset with the code for the shield. I spent a few minutes trying to get my display to work and finally looked closely at the code.</p><p>// For the breakout, you can use any (4 or) 5 pins</p><p>#define sclk 4</p><p>#define mosi 5</p><p>#define cs 6</p><p>#define dc 7</p><p>#define rst 8 // you can also connect this to the Arduino reset</p>
Hello, <br>I want to use a larger display 3.2 for this project, what would I use here? <br> <br>Thanks nice project
Hello Well, maybe a stupid question but <br>How can I set the date and time I have some tried but no result. <br> <br>Thanks Bill
Use the sample sketch that came with the rtc library there is an option to set the rtc to your compute time <br> <br>
Code to set the clock: <br> <br>if (! RTC.isrunning()) { <br> <br> // following line sets the RTC to the date &amp; time the sketch is compiled <br> RTC.adjust(DateTime(__DATE__, __TIME__)); <br> }
Here's an sketch to run just the RTC, copy and paste to the Arduino IDE. it sets the clock if it's not set. <br>// Sketch Build 1.04 compiled on Arduino 1.0.3. <br>// This sketch was modified to run the loop faster.. refresh rate is about 1.5 seconds. <br>// copy the sketch below and paste it into the Arduino IDE verify, and run the program. <br>// this sketch was created using code from the adafruit and RTC -libraries <br>#define sclk 4 <br>#define mosi 5 <br>#define cs 6 <br>#define dc 7 <br>#define rst 8 <br> <br>#include // Core graphics library <br>#include // Hardware-specific library <br>#include <br>#include // library needed for RTC <br>#include &quot;RTClib.h&quot; //RTC Library <br> <br>RTC_DS1307 RTC; <br> <br>Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst); <br> <br>void setup(void) { <br> <br> Wire.begin(); <br> RTC.begin(); <br> <br> tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab <br> <br> tft.fillScreen(ST7735_BLACK); // Clear screen <br> <br> if (! RTC.isrunning()) { <br> tft.println(&quot;RTC was NOT running!&quot;); <br> // following line sets the RTC to the date &amp; time this sketch was compiled <br> RTC.adjust(DateTime(__DATE__, __TIME__)); <br> delay(3000); <br> tft.fillScreen(ST7735_BLACK); // Clear screen <br> <br> } <br>} <br> <br>void loop() { <br> tft.setCursor(10,0); <br> tft.setTextColor(ST7735_WHITE); <br> tft.setTextSize(1); <br> tft.println(&quot;INSTRUCTABLES.COM&quot;); <br> tft.setTextColor(ST7735_YELLOW,ST7735_BLACK);//set text color &amp; size for DATE coming from TinyRTC <br> tft.setTextSize(2); <br> tft.setCursor(5,30); <br> DateTime now = RTC.now(); <br> tft.print(now.year(), DEC); <br> tft.print('/'); <br> tft.print(now.month(), DEC); <br> tft.print('/'); <br> tft.print(now.day(), DEC); <br> tft.println(' '); <br> tft.setCursor(15,70); <br> tft.setTextColor(ST7735_GREEN,ST7735_BLACK); //set color for TIME <br> tft.setTextSize(2);//set text size for TIME coming from TinyRTC <br> tft.print(now.hour(), DEC); <br> tft.print(':'); <br> if(now.minute() &lt; 10) { <br> tft.print('0'); <br> tft.print(now.minute(), DEC); <br> } <br> else { <br> tft.print(now.minute(), DEC); <br> } <br> tft.print(':'); <br> if(now.second() &lt; 10) { <br> tft.print('0'); <br> tft.print(now.second(), DEC); <br> } <br> else { <br> tft.print(now.second(), DEC); <br> } <br> tft.println(&quot; &quot;); <br> <br> } <br> <br>
Hi, I have a problem with the library, in my sketch it's written : <br> <br>In file included from sketch_sep21a.ino:12: <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:9: error: stray '\302' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:9: error: stray '\267' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:9: error: stray '\302' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:9: error: stray '\267' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: stray '#' in program <br>In file included from sketch_sep21a.ino:13: <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:9: error: stray '\302' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:9: error: stray '\267' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:9: error: stray '\302' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:9: error: stray '\267' in program <br>In file included from sketch_sep21a.ino:13: <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:315:46: error: exponent has no digits <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:316:62: error: exponent has no digits <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_ST7735/Adafruit_ST7735.h:599: error: stray '#' in program <br>In file included from sketch_sep21a.ino:12: <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:4: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:403: error: expected constructor, destructor, or type conversion before 'const' <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '=' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected constructor, destructor, or type conversion before '.' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected constructor, destructor, or type conversion before '.' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected constructor, destructor, or type conversion before '.' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br>C:\Users\Bichon\Desktop\arduino-1.0.3\libraries\Adafruit_GFX/Adafruit_GFX.h:552: error: expected unqualified-id before '&lt;' token <br> <br> <br>I have try other version and other library but they don't work... coul'd you help me please <br>Thank you
can you guide me sir?
The DHT sensor and display are working fine. When I try to compile this sketch on either the 1.01 or 1.05 IDE environment I get <br> <br>sketch_aug18a:17: error: expected constructor, destructor, or type conversion before numeric constant <br>sketch_aug18a.cpp: In function 'void setup()': <br>sketch_aug18a:23: error: request for member 'attach' in '11', which is of non-class type 'int' <br>sketch_aug18a.cpp: In function 'void loop()': <br>sketch_aug18a:78: error: request for member 'temperature' in '11', which is of non-class type 'int' <br>sketch_aug18a:82: error: request for member 'humidity' in '11', which is of non-class type 'int' <br>sketch_aug18a:86: error: request for member 'fahrenheit' in '11', which is of non-class type 'int' <br>sketch_aug18a:91: error: request for member 'kelvin' in '11', which is of non-class type 'int' <br>sketch_aug18a:96: error: request for member 'dewPoint' in '11', which is of non-class type 'int' <br>sketch_aug18a:100: error: request for member 'dewPointFast' in '11', which is of non-class type 'int <br>Ideas? <br>
Check the dht Library.seems like it's Not installed properly
Very nice instructable! <br>Don't forget to add the leading &quot;0&quot; for Minutes and Seconds when &lt; 10 on the RTC. <br>; )
if you are looking to connect RPI + boards or any other combination I found a cheep solution: its called a BOARD_GANIZER check it out especially if you have a bunch of wires, <br>youtube.com/watch?v=7rqlSpln6U&shy;&shy;&shy;0 found it on newark element14 website and Digikey <br>http://www.digikey.com/product-search/en?mpart=BG-32618&amp;vendor=377
Hi, I have a outdoor fishpond, and like to know any temperature sensor that can be used to monitor the water temp of my fishpond?
https://www.sparkfun.com/products/11050<br>That.s a link to a senor that may work for you.
I finished my monitor this week. It works fine. I changed the color of the seconds from blue to green
Cool.. if you can, share a picture..glad someone else enjoyed building it as much as I enjoyed sharing it.
So how can I datalog all the info for tracking?
You could probably log the data into a Micro SD card using the built in card slot on the display. I haven't tried that .. yet. Otherwise, you can log to your PC if you keep the USB cable plugged and use the serial.print ( ) command in addition to , or instead of the tft.print commands.. i.e replace all tft with serial and it will display on the arduino serial monitor -check the examples that come with the DHT libraries.

About This Instructable

235,638 views

1,164 favorites

License:

More by johnag:  Arduino  DEMO series Make an Oscilloscope Using the SainSmart Mega2560 with the TFT LCD shield and the 3.5 "color touch screen Make a Mini Arduino programmable  4 channel DC-DVM
Add instructable to: