Some Progress, Need Help PLEASE

If I sound desperate, its because I am. After 2 weeks I finally am able to at least write words on 3.2 sainsmart lcd. I cant find much as far as templates go. I am trying to display the current temperature and time. I have the temperature code on there but it shows a zero on the screen, I dont even know where to start with the time. Heres my code so far.

//

#include <UTFT.h>
#include <dht11.h>
#include <Arduino.h>
#include <Time.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];

// Uncomment the next line for Arduino Mega
UTFT myGLCD(ITDB32S,38,39,40,41); // Remember to change the model parameter to suit your display module!

#define DHT11PIN 7

void setup()
{
myGLCD.InitLCD();
myGLCD.clrScr();
myGLCD.setFont(BigFont);
}
void loop()
{
myGLCD.print("Reef Spy v.1.0", 0, 0);
myGLCD.setColor(0, 0, 255);
myGLCD.setFont(BigFont);

myGLCD.print("Fogleman Reef", 0, 15,0);
myGLCD.setColor(0, 0, 255);
myGLCD.setFont(BigFont);

int temperature;
myGLCD.setColor(0, 0, 255);
myGLCD.setFont(BigFont);
myGLCD.printNumI(temperature ,0,30, 0);
delay(5);
}

Please Help me, this C++ is killing me. Sad part is I am half Asian....

Is google broken in your country ? Try google "dht11 arduino". A lot of examples.

Keep in mind, thes dht11 devices don't seem to be very good. If you search this forum, you will find that lots of people are unhappy with them.

To display the time, you will need to get an RTC ( real time clock ) device, and interface to it.

Or a GPS module, which will tell you the time very accurately.

Is google broken? No but nice reply. I am trying to get it displayed on a 3.2 tft. Unless its the exact same as any other lcd. Otherwise everything I have googled and tried have been wrong. Since youre fond of google how bout you google something with regards to time and 3.2tft.

I do have the RTC working and functional just lost in how to implement on my lcd. These 3.2 have little to no information on them except what Karl Henning has produced to get them to work.

Hi GrundelGravy

I have the temperature code on there

In the program you posted, I can't see any code to read the temperature from the sensor.

You include the DHT11 library and define a constant for the pin it uses. But you will also need to create an instance of the DHT11 object and then call functions to get the temperature into a variable. Then your code will display it on the LCD.

Are there example programs with the DHT11 library that you can take code from?

Regards

Ray

Thanks for the reply. I see I included the library but did not do any of the other things. I will have to keep reading on what all that means. I do have a library for it but just not understanding the call to functions and constants and all that good stuff. I will work on what you said and hopefully get further.

I went ahead and ditched the 3.2 as it was a real pain with little information. Being a newbie to the arduino I am just going to use a 20x4 plain blue old school LCD. Easier to program with more of a tried and true feel. I am not using the arduino as a cell phone so dont need the huge screen and would like to have more usable digital pins. Thank you for the help though, much appreciated to those that actually helped for a resolution.

GrundelGravy:
Easier to program with more of a tried and true feel.

Well, you are right about that, but I bet the lust for the big LCD will come back to you eventually.
Once you have gotten things sorted on the 20x4, the transition to a graphics LCD will be a lot easier. The actual production of the data is the same for both and it's then just a matter of presenting it to the LCD, which is essentially a matter of placing it by x,y pixel rather than line and character.

If your screen is compatible with Henning Karlsen's library, that is really all you need, and I suspect his documentation is better than anybody else's. Unfortunately, his examples don't address text very much, but there is enough there.

This thread has some stuff on mixing graphics with plain vanilla data from DS18B20 temp sensors.

http://forum.arduino.cc/index.php?topic=238252.msg1711075#msg1711075

Since youre fond of google how bout you google something with regards to time and 3.2tft.

You are thinking of going about things in the wrong way.

You have two separate problems to solve.

(1) How to interface to a "real time clock" device, and read the time from it into your arduino.

(2) How do display numbers, which you have in your arduino, onto your particular LCD device.

You solve these problems separately, and one at a time.

Then you incorporate these two pieces of functionality into your final sketch.

Yeah I've figured that out. One thing at a time. Thank you.