LCD display errors

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

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.

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:

// 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.

Hi,

Grove Starter Kit 1.1b with the included LCD. Below is the code from your site at:http://www.seeedstudio.com/wiki/Grove_-_Serial_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 :slight_smile:

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 .

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,

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)'

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.

Look at seeedstudio.com/wiki/Grove_-_Serial_LCD

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

edit
NewSoftSerial runs not with Arduino 1.0. Use onboard library SoftwareSerial for your projects.

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/SerialLCD/SerialLCD_arduino_1.0_20120107.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]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.[/code]

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.

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

I wrote the answer of your question 2 topics above :wink:
Use the seriallcd library for arduino 1.0.
No newsoftserial library with arduino 1.0 <—!!!

Hello Ken,

From this line:

It looks like you are using the wrong libraries and/or maybe outdated example code.

I recommend using the unified driver I posted. Also remove the above reference to NewSoftSerial.h. It’s not required in Android 1.0 when using the unified driver.

See elsewhere on google if you need instructions on how to install (driver) libraries into the Arduino application.