Go Down

Topic: LCD_screen Library Suite (Read 68276 times) previous topic - next topic


Real nice, I see you have the new 4.3" screen, it seems to have a wider aspect ratio which looks good.

Rob Gray aka the GRAYnomad www.robgray.com


Latest release 29 from the repository allows using the buttons without the de-bouncing behaviour,  i.e. pressing then releasing the button.
Jan 25, 2012 release 29 - button with instant option (no de-bouncing)

The instant_main example illustrates both behaviours:
Now, to use a button with no-debouncing, just write
Code: [Select]
if (button.check(true)) {

The true parameter goes rid of the de-bounced behaviour.

For the normal de-bounced behaviour, use one of the following
Code: [Select]

Enjoy :)


This new release brings a new graphic Histogram.

Histogram features peak memory, horizontal and vertical grid, and many more options!


New release Feb 01, 2012 includes specific formatting function ttoa to display time. Parameters is in ms and the string returned selects the right unit --ms, s, mn or h-- automatically.

Each .h / .cpp file has now its own numbering for easier management. Release control is performed as a pre-processor instruction:
Code: [Select]
// test release
#error required PROXYSERIAL_RELEASE 106

So as at today, latest releases are:
  • Serial_LCD Jan 28, 2012 release 119 - colours constants e.g. redColour
  • proxySerial Feb 01, 2012 release 106 - ttoa used
  • Graphics Feb 01, 2012 release 106 -- ttoa time to string added
  • button / GUI Jan 28, 2012 release 108 - new index

As always, documentations, examples, downloads and tutorials are available here.



Please find a first release of an Arduino library for the amazing 4D LABS ?LCD-32PT(SGC) 3.2" Serial LCD Display Module.

To draw a triangle, instead of sending that ASCII string
  • G 0, 200, 0, 160, 0, 160, 0, 80, 100, 60, 0xff, 0xff

use plain
  • myLCD.triangle(200, 160, 160, 80, 100, 60, 0xffff)



I'm incredibly excited about these displays, and more importantly, the excellent library that seems to be in development.

I'm trying to get your example code running on an Arduino Uno with a 4D Systems uOLED-96-G1 and or a uOLED-160-G1 (I have both modules).

I think I've read the documentation on 1) the 4D website, 2) Avenue33's website, and 3) the Arduino forum.

I've installed a new copy of Arduino 22, pulled down SoftwareSerial and renamed it NewSoftSerial.

Upon trying to upload the program, I get:
'NewSoftSerial' does not name a type
sketch_feb06a:1: error: 'NewSoftSerial' does not name a type
sketch_feb06a.cpp: In function 'void setup()':
sketch_feb06a:5: error: 'mySerial' was not declared in this scope

I've now tried this on two computers and I'm getting consistent errors.  Looking on the Arduino forums, it appears that I may have installed the libraries incorrectly (that's what seems to be the consensus on the "'NewSoftSerial' does not name a type" error).  However, I can see the libraries in my "Import Library" menu, and all of my other libraries seem to be working fine.  It seems that this isn't where the issue is.  Anyone have any ideas?


I'm still using Arduino 0023 and the NewSoftSerial beta version 11.

I haven't tested yet Arduino 1.0 which packs an updated version of NewSoftSerial called SoftwareSerial.

Which versions of Arduino IDE and NewSoftSerial / SoftwareSerial are you using? You don't mention them.

Arduino 1.0 has introduced in-depth modifications for serial and i2c functions.

I'm waiting for MPIDE for chipKIT boards to be released to version1.0 before considering an update of the Serial_LCD project. 


I'm terribly sorry.  I meant to include these items.

I've tried using both Arduino 23 and Arduino 22, both with NewSoftSerial version 11 beta (the one referenced on your web page).  I renamed SoftwareSerial to NewSoftSerial, both the directory and the .h/.cpp files.


Where are placed the the Serial_LCD and NewSoftSerial beta release 11 libraries on your computer?

In my working configuration, the Serial_LCD and NewSoftSerial beta release 11 libraries are placed on the Libraries sub-folder of the sketchbook, which is the standard place for the user's libraries.


I included the clip from the screenshot, just in case I'm missing something obvious.  The libraries are installed as you describe, in the "Libraries" sub-folder.


Feb 06, 2012, 10:16 pm Last Edit: Feb 06, 2012, 10:18 pm by avenue33 Reason: 1
There are 2 libraries sub-folders:

  • one under Arduino, as shown in your screen-shot

  • another under the Libraries folder within your sketchbook.

The sketchbook is where you place all your projects.
To define it, go to Arduino > Preferences.
Then close and restart Arduino.


OK, my mistake.

I copied my "Libraries" folder from the Arduino directory to my "\My Documents\Arduino" directory.  When I started up the Arduino IDE I had two copies of the libraries showing up in "Examples".  I pressed on, and tried to get the demo code to upload.  No luck, I got the same error.

I went to the Arduino "working" directory (the one that I sent the screenshot showing) and deleted the "Libraries" directory from there, in case there was some kind of conflict.  I restarted the Arduino IDE, and there was only one copy of the library showing up in "Examples".  I tried the code upload again, but I'm still getting the same error.

I can't tell you how badly I want to use this library.


Feb 06, 2012, 11:01 pm Last Edit: Feb 12, 2012, 04:42 pm by avenue33 Reason: 1
Add at the beginning of your sketch

Code: [Select]
#define __AVR___

Other users reported it fixed the library not being included.

Otherwise, it is a NewSoftSerial issue.

[font=Verdana]• Edit
Please refer to the Feb 12, 2012 release.[/font]


Avenue this library looks awesome - so much so that I might install the 0.22 IDE and buy one of these screens for my laser controller.

It has everything I want - buttons, menus, dialogues etc.

Looks like I have some work ahead of me :)

Thanks for working on this!


Feb 12, 2012, 04:45 pm Last Edit: Feb 14, 2012, 06:04 pm by avenue33 Reason: 1
Please find a bug-fix release with a bug-fix for the Arduino IDE:

__AVR__ is recognised by chipKIT MPIDE solely but not by Arduino IDE.
• Arduino IDE requires __AVR_ATmega328P__ or similar.

Adapt __AVR_ATmega328P__ to __AVR_ATmega1280__ or __AVR_ATmega2560__ based on your Arduino mega board.

In the .h files, please change the code from
Code: [Select]
#if defined(__AVR__)
Code: [Select]
#if defined(__AVR__)  || defined (__AVR_ATmega328P__)
or simply add
Code: [Select]
#define __AVR__

Serial_LCD: Feb 12, 2012 release 119a - __AVR_ATmega328P__ added
proxySerial: Feb 12, 2012 release 106a - __AVR_ATmega328P__ added
button / GUI: Feb 12, 2012 release 108a - __AVR_ATmega328P__ added
Graphics: Feb 12, 2012 release 106a - __AVR_ATmega328P__ added

Example sketches have been updated.

Go Up