LCD display errors

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

bluedude
Pre-kindergarten
Pre-kindergarten
Posts: 19
Joined: Sun Oct 17, 2010 7:31 pm

LCD display errors

Post by bluedude » Fri Dec 23, 2011 11:33 pm

Hi,

I'm running hello world with Grove and LCD display but it gives me the following error:

In file included from Display.cpp:16:
C:\Program Files (x86)\arduino-1.0\libraries\SerialLCD/SerialLCD.h:28:22: error: WProgram.h: No such file or directory
In file included from C:\Program Files (x86)\arduino-1.0\libraries\SerialLCD/SerialLCD.h:29,
from Display.cpp:16:
C:\Program Files (x86)\arduino-1.0\libraries\NewSoftSerial/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
C:\Program Files (x86)\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

I have the libraries on my system:

#include <SerialLCD.h>
#include <NewSoftSerial.h> //this is a must

yuriq
Elementary-3
Elementary-3
Posts: 383
Joined: Wed Dec 07, 2011 5:33 pm

Re: LCD display errors

Post by yuriq » Mon Dec 26, 2011 4:20 pm

So which LCD do you use?What type? And with which model of the Grove?Please tell us more detail.
What code do you use?Test code have been try?

Thanks for support us.

emanresu
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Tue Dec 27, 2011 12:41 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Just started.

Re: LCD display errors

Post by emanresu » Tue Dec 27, 2011 12:59 am

I got the same errors with the following configuration:

-Arduino IDE 1.0
-Grove Serial LCD v1.1b (from Grove Starter Bundle)
-SerialLCD v1.0b-Library (from Wiki)
-NewSoftLibrary (from the Wiki)

The following sample code from the wiki:

Code: Select all

// include the library code:
#include <SerialLCD.h>
#include <NewSoftSerial.h> //this is a must
 
// initialize the library
SerialLCD slcd(11,12);//this is a must, assign soft serial pins
 
void setup() {
  // set up : 
  slcd.begin();
  // Print a message to the LCD.
  slcd.print("hello, world!");
}
 
void loop() {
  // Turn off the blinking cursor:
  slcd.noBlink();
  delay(1000);
   // Turn on the blinking cursor:
  slcd.blink();
  delay(1000);
}
Having done a quick google, it seems that the SerialLCD lib may need to be updated for Android 1.0. It looks like WProgram.h has been deprecated/replaced.

bluedude
Pre-kindergarten
Pre-kindergarten
Posts: 19
Joined: Sun Oct 17, 2010 7:31 pm

Re: LCD display errors

Post by bluedude » Wed Dec 28, 2011 4:59 am

Hi,

Grove Starter Kit 1.1b with the included LCD. Below is the code from your site at:http://www.seeedstudio.com/wiki/Grove_- ... _LCD_v1.0b

// include the library code:
#include <SerialLCD.h>
#include <NewSoftSerial.h> //this is a must

// initialize the library
SerialLCD slcd(11,12);//this is a must, assign soft serial pins

void setup() {
// set up
slcd.begin();
// Print a message to the LCD.
slcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
slcd.setCursor(0, 1);
// print the number of seconds since reset:
slcd.print(millis()/1000,DEC);
}

BTW, there isn't much other code on your site so It is impossible to pick the wrong one :-)

HugeMan
Elementary-2
Elementary-2
Posts: 248
Joined: Tue Jan 25, 2011 2:04 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: DSO

Re: LCD display errors

Post by HugeMan » Fri Jan 06, 2012 12:28 pm

hello, i have tested the newsoftware lib in the arduino1.0 and found it compiles error. and in arduino022 or 023 the lib works fine. a suggestion is use the arduino022 or 023 before a better solution was found .

R3tikus
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Fri Jan 06, 2012 6:15 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso nano v2, serial lcd,

Re: LCD display errors

Post by R3tikus » Fri Jan 06, 2012 6:23 pm

well, i find in google, and arduino 1.0 change the libraries, you should change Wprogram.h for Arduino.h and work, but it send other message,

Code: Select all

In file included from C:\Users\R3tikus\Desktop\arduino-1.0-windows\arduino-1.0\libraries\SerialLCD/SerialLCD.h:29,
                 from sketch_jan06a.cpp:2:
C:\Users\R3tikus\Desktop\arduino-1.0-windows\arduino-1.0\libraries\SerialLCD/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
C:\Users\R3tikus\Desktop\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'

sean2
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Thu Dec 15, 2011 8:12 am

Re: LCD display errors

Post by sean2 » Wed Jan 18, 2012 7:55 am

I am having the same issues trying to help my daughter learn to program an Arduino Uno for use in her science fair project.

It is clear that the SerialLCD library is not compatible with the Arduino v1.0 development environment because is calls for libraries (like NewSoftSerial.h and WProgram.h) that are no longer part of the environment.

What would be useful for folks like myself who are purchasing Seeedstudio kits would be some sort of notification that we should not expect things to work if we are using the current environment.

I do not mind doing a little Google research, but in this case Seeedstudio needs to do the right thing and:
1. let people know if what they are buying will work without modification (like dropping back to an old IDE)
2. update their posted and/or included code samples so that they are usable with the current IDE

Instead of learning about LCD usage with the Arduino Uno I have been learning about the best ways to phrase advanced search strings in Google, and still do not have a working LCD.

Any Seeedstudio staff watching these posts? PLEASE repost your SerialLCD.h library to be compatible with the v1.0 IDE and update your code samples as needed.

schmron
Elementary-1
Elementary-1
Posts: 145
Joined: Mon Dec 05, 2011 6:12 am

Re: LCD display errors

Post by schmron » Wed Jan 18, 2012 10:41 am

Look at http://www.seeedstudio.com/wiki/Grove_-_Serial_LCD

There is a version only for arduino 1.0:
https://github.com/downloads/fschaefer/ ... 120107.zip

*edit*
NewSoftSerial runs not with Arduino 1.0. Use onboard library SoftwareSerial for your projects.
Best regards from Vienna/Austria
Rony

emanresu
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Tue Dec 27, 2011 12:41 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Just started.

Re: LCD display errors

Post by emanresu » Sat Jan 21, 2012 4:03 pm

Thanks to schmron for the update notice!

I got my device working. Just for information, I will explain my experience.

The wiki now offer two drivers which are applicable to the v1.1b LCD device operating under Arduino 1.0. A specific driver for that device only, and a unified driver for all devices.

Specific: SerialLCD_arduino_1
https://github.com/downloads/fschaefer/ ... 120107.zip

Unified: SerialLCD
http://misc.luno.org/Grove_SerialLCD.zip

Unfortunately, I couldn't get the examples of the specific driver working. The sketches successfully compiled and were uploaded, but there was no activity on the LCD device.

With the unified driver, I was able to get most of the examples working. However there was a new error. The last two examples "SetCursor" and "TextDirection", the following error is produced:

The 'BYTE' keyword is no longer supported.

Code: Select all

SetCursor.cpp: In function 'void loop()':
SetCursor.pde:-1: error: 'BYTE' was not declared in this scope

As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.
After a bit of playing, I realised that simply removing the "BYTE" argument from the slcd.print() call solved the problem. It looks like the example files may not have been updated.

Happy coding.

california-ken
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Sun Jan 01, 2012 3:18 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Electronic Brick

Re: LCD display errors

Post by california-ken » Wed Jan 25, 2012 7:23 am

I am having the same problems as others have posted below.

Setup: Ardunio UNO, R3; Grove Shield, Vol 1.2; Grove Serial LCD, Version 1.1B, Ardunio 1.0 Software; Liquid Crystal and NewSoft
serial libraries. Ardunio code (repeated for conveniennce):

// include the library code:
#include <SerialLCD.h>
#include <NewSoftSerial.h> //this is a must

// initialize the library
SerialLCD slcd(11,12);//this is a must, assign soft serial pins

void setup() {
// set up :
slcd.begin();
// Print a message to the LCD.
slcd.print("hello, world!");
}

void loop() {
// Turn off the blinking cursor:
slcd.noBlink();
delay(1000);
// Turn on the blinking cursor:
slcd.blink();
delay(1000);
}


Resulting error messages:


In file included from Moisture_to_LCD.cpp:2:
D:\Arduino Programming\arduino-1.0\libraries\LiquidCrystal/SerialLCD.h:28:22: error: WProgram.h: No such file or directory
In file included from D:\Arduino Programming\arduino-1.0\libraries\LiquidCrystal/SerialLCD.h:29,
from Moisture_to_LCD.cpp:2:
D:\Arduino Programming\arduino-1.0\libraries\LiquidCrystal/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
D:\Arduino Programming\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

Can someone provide me with a solution to this problem? Also, The Serial LCD, V 1.1b has only 1 4 pin connector. Where do I connect the cable to the Grove Shield?

Thank you.

Ken

Post Reply