Pages: [1]   Go Down
Author Topic: Iteadstudio 16X2 Serial LCD Problem  (Read 726 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there guys.

Okay let me explain my problem. I've got myself the Iteadstudio 16X2 Serial LCD today which I will be using on my Weather Station project. The project itself is going great and I got it to work with the LCD1602 KeyShield 2.0. Due to the the amount of pins the Shield uses, I decided to go for the IdeadStudio 16X2 Serial LCD which only uses 2 pins which appealed to me.

I got the screen to work and it is showing whatever I am sending to it, my problem is I don't know how to send the value of a ever changing variable to it. To send text to the screen you need to use Serial.print("ssSample text;"); unlike the shield which uses lcd.print("Sample text");. Now I've got a variable celsius which obviously changes from time to time and to print that to the screen on the shield I would just use lcd.print(celsius); but I've looked all over the internet but can't seem to find a way to do that with the SerialLCD.

Hope I explained my problem well enough here.

Thanks
« Last Edit: April 12, 2013, 04:50:06 pm by SYNC3D » Logged

Quebec
Offline Offline
Jr. Member
**
Karma: 3
Posts: 78
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What about Serial.print(celsius);?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

allo,
Try this. Should work. It's just a part of the code.
Quote
  int h = DHT11.humidity; //integerValue;
  delay(50);
  char sh[1]; // maximun number
  delay(50);
  sprintf(sh, "ss%d;", h); // Integer conversion and string format
  delay(50);
  myLcdSerial.print("sd0,0;"); //set coordinate (col 0,row 2)
  delay(50);
  myLcdSerial.print(sh); // Command IteadStudio for 'send string'
  delay(50);

Logged

Pages: [1]   Go Up
Jump to: