Arduino temperature graph with NOKIA 5110

Hi , I have been searching for Temperature data logging(graph) using NOKIA 5110 lcd for a long time , did not get example code or library .

Kindly help me.

henning karlsen has a 5110 graphics library

I have tried the library , there is one regrading sine wave plotting but other than that there no real time example of data logging .

myGLCD.clrScr();
 myGLCD.drawRect(0, 0, 83, 47);
 myGLCD.drawLine(0, 23, 84, 23);
 myGLCD.drawLine(41, 0, 41, 47);
 for (int c=0; c<4; c++)
 {
   for (int i=0; i<84; i++)
   {
     y=i*0.017453292519943295769236907684886;
     myGLCD.invPixel(i, (sin(y*6)*20)+23);
     myGLCD.update();
     delay(20);
   }
 }

there is one regrading sine wave plotting but other than that there no real time example of data logging .

What's the difference? Drawing a line is drawing a line.

But real problem comes ,when i try to customize it but changing the sine wave input with temperature and sec

in x and y axis

I got only a strait line even the temperature changes

here Input is the temperature

  for (int i=0; i<83; i++)
  {
  // y=i*0.017453292519943295769236907684886;
  
   myGLCD.invPixel(i,input);
   
    delay(20);
}

I got only a strait line even the temperature changes

I would expect a straight line from one time/temperature coordinate to another time/temperature coordinate. Why would you expect something else?

What is it you are trying to draw a line for? I would expect to have x, y locations for each end of the line, where x is time and y is temperature.

maddysiju: But real problem comes ,when i try to customize it but changing the sine wave input with temperature and sec

    delay(20);
}

The code is incomplete. Your post reasonably implies an update of the graph every second. The code looks like you intend to update the graph 50 times a second so I guess a straight line is unsurprising..

Thanks for your information, but how do I increment the loop for every 1 sec and 1 degree temperature increase

I'm using a 84*48 lcd .

At the moment, you appear not to have a loop at all, and use a for-next to do the whole job. This implies the whole job is over in 1.68 seconds - if it worked at all. It seems you don't understand the most basic way a programme is structured, and it would pay to look at an example in the IDE.

Essentially, it is something like.

call libraries and declare variables
int x=0; // x-axis

void setup() {
  // put your setup code here, to run once:
setup LCD
lcd.begin()
}

void loop() {
 // put your main code here, to run repeatedly:
read temp;
convert temp if and as necessary;
   myGLCD.invPixel(x,temp);
x=x+1;
if x>83{
x=0;
lcd.clear()
}
delay(1000);
}

Thanks for your code. It worked , Graph is plotting perfectly .