Pages: 1 ... 9 10 [11] 12   Go Down
Author Topic: LCD_screen Library Suite  (Read 37123 times)
0 Members and 1 Guest are viewing this topic.
France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Driving two screens is possible with the Serial_LCD Library Suite, with one serial port per screen.

Learn more on how to proceed and download the sketch with two galleries!

Logged


nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8603
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, two screens now eh?

When are you coing to port Windows to your library smiley

That new 4" LCD seems brighter, or is that just the photo or different colour setting by the program?

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately, taking pictures of the screens is very difficult.

As they are very bright and the camera has auto white balance, I had to rework the temperature and the saturation.

Windows? I don't want blue screens of death on my Arduino smiley



Anyway, a Windows-liek GUI would requires more MCU power to work.

Maybe with an Arduino Due if I manage to get one!
« Last Edit: December 01, 2012, 02:46:11 pm by avenue33 » Logged


France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please find a new release of the Serial_LCD Library Suite:
 
proxySerial • Nov 28, 2012 release 314 • utoa renamed u64toa
Gallery • Nov 29, 2012 release 311 • array[MAXPICTURE] instead of vector
GUI • Dec 01, 2012 release 318 • new area object
 
The new area object is a button without text or a hidden button. This is especially useful to define active zones on a displayed picture.
 
Instead of defining each element, buttons, icons, … of the interface, display a single picture and define active zones on it.
 
As always,
• Documentation http://embeddedcomputing.weebly.com/serial-lcd
• Download http://embeddedcomputing.weebly.com/download
Logged


Brussels, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, thank you for your excellent work.
This works very well on both my Arduino Uno and Mega. But sadly I cant get it to work on my Arduino Due. Is there ant way to get it working or are you planning on changing the code to include the Arduino Due?
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

First, thank you for your excellent work.

You're welcome!

This works very well on both my Arduino Uno and Mega. But sadly I cant get it to work on my Arduino Due. Is there ant way to get it working or are you planning on changing the code to include the Arduino Due?

I tested the build and link with Arduino 1.5 for the Arduino Due.

Unfortunately, as I don't have an Arduino Due at hand, I can't perform the required tests.
Logged


Brussels, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for your reply.
I tried to compile the GUI_main.pde example on 1.5.1r2, but it gives me this errors:
Code:
GUI_main:37: error: #error Platform not supported
GUI_main:77: error: #error Platform not defined
In file included from GUI_main.pde:42:
C:\Users\hjjensen\Documents\Arduino\libraries\proxySerial/proxySerial.h:64: error: 'boolean' has not been declared
In file included from GUI_main.pde:43:
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:86: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:87: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:93: error: 'boolean' has not been declared
In file included from GUI_main.pde:43:
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:115: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:117: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:120: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:131: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:132: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:133: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:135: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:161: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:162: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:163: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\Serial_LCD/Serial_LCD.h:172: error: 'boolean' does not name a type
In file included from GUI_main.pde:44:
C:\Users\hjjensen\Documents\Arduino\libraries\GUI/GUI.h:77: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\GUI/GUI.h:78: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\GUI/GUI.h:79: error: 'boolean' has not been declared
C:\Users\hjjensen\Documents\Arduino\libraries\GUI/GUI.h:80: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\GUI/GUI.h:86: error: 'boolean' does not name a type
C:\Users\hjjensen\Documents\Arduino\libraries\GUI/GUI.h:114: error: 'boolean' does not name a type
GUI_main:82: error: 'mySerial' was not declared in this scope
GUI_main.pde: In function 'void setup()':
GUI_main:114: error: 'Serial' was not declared in this scope
GUI_main:130: error: 'mySerial' was not declared in this scope
GUI_main.pde: At global scope:
GUI_main:184: error: 'boolean' does not name a type
GUI_main.pde: In function 'void loop()':
GUI_main:196: error: 'class button' has no member named 'check'
GUI_main:203: error: 'Serial' was not declared in this scope
GUI_main:207: error: 'class button' has no member named 'check'
GUI_main:210: error: 'Serial' was not declared in this scope
GUI_main:214: error: 'class button' has no member named 'check'
GUI_main:215: error: 'slider' was not declared in this scope
GUI_main:217: error: 'Serial' was not declared in this scope
GUI_main:222: error: 'class button' has no member named 'check'
GUI_main:226: error: 'Serial' was not declared in this scope
GUI_main:238: error: 'millis' was not declared in this scope
I also tried to force it to include Arduino.h, but is still does not work.
Logged

Brussels, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Never mind... Problem solved :-)
I just forced your libraries to: #include "Arduino.h" and it seems to work fine.
More testing will show if it really works though...
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad it works.

Unfortunately, I don't have an Arduino Due at hand so I can't perform the required tests.

Normally, the conditional statement should include Arduino.h.

Code:
#if defined(ARDUINO) && (ARDUINO >= 100)
#include "Arduino.h"
Logged


Brussels, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know why that condition is not working, and sadly I did not have much time for more testing for now. In the next few days I should be able to test it a bit more. Apparently the SD card is not functioning as it should, but again, I did not test it very much.
Logged

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

Hi,

first of all, thank you for you work!

I'am new to Arduino and i need a quick solution for a small project where i took a look
at the µLCD-32WPTU display from 4D. I like the display because of the integraded sdcard
holder and the speaker.

I read the instruction set of the display about the sdcard part.
Is it possible with you library to load and show some icons directly from the sdcard holder
on the display? Or maybe a animated gif?

Like a command showImageFromSD(x,y,filename) ?

In the documentation of the display i only found a solution with vectors to files, but that doesn't work
for me, because the images on the sdcard should be replaceable by the user (and that not a programmer :-) ).
They should get names like startup.bmp, backgr.bmp, inp_1_on.bmp, inp_1_off.bmp, etc...
Also some lines of textfiles should be read directly from the sdcard on the display, and playing some short
soundfiles too.

Is this possible with your library?

I'am sorry if these are stupid questions, i'am new to this whole Arduido thing. I programmed in Assembler on 8051
compatible cpus in the past...

Thanks a lot!

With best regards,
 Martin
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You're welcome!

The µLCD-32WPTU uses a new firmware which is not compatible with my library. Please consider instead the serial environment provided by the manufacturer.

Quote
4D Systems all new Workshop 4 IDE supports multiple development environments, to cater for different user requirements and skill level.
A Serial environment is also provided to transform the display module into a slave serial display module, allowing the user to control the display from any host microcontroller or device with a serial port.
The Workshop 4 IDE is available for download from its product page: 4D Workshop 4 IDE

Please download the Workshop 4 - Serial Command Set Reference Manual
Logged


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

Hi,

i understand, this is a "single piece" project, so its not important for me to use the latest display on the market, i can use a
µLCD-43PT(SGC) or µLCD-32PT(SGC) display too. Your library will work perfect with these models right?

So when using these models with your library, is it possible to show some icons directly from the sdcard?

If its not possible to load and show small images (like 32x32 or 64x64) directly via the filename from the fat partition of the
sdcard, would it be possible to show images when "converting" them via a 4D software and show them from the "library"?

Thanks!

Ciao
 Martin
Logged

France
Offline Offline
God Member
*****
Karma: 11
Posts: 647
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i understand, this is a "single piece" project, so its not important for me to use the latest display on the market, i can use a
µLCD-43PT(SGC) or µLCD-32PT(SGC) display too. Your library will work perfect with these models right?

Yes, as long as they have a SGC firmware version 22.

So when using these models with your library, is it possible to show some icons directly from the sdcard?

Yes, anywhere on the screen!

If its not possible to load and show small images (like 32x32 or 64x64) directly via the filename from the fat partition of the
sdcard, would it be possible to show images when "converting" them via a 4D software and show them from the "library"?

Yes!

You have two options: either each picture is a separate file, or all the pictures are inside a same file and are shown using the gallery library.

In this example, a battery indicator is displayed on top of another image:



Thanks!

You're welcome!
« Last Edit: January 02, 2013, 12:19:21 pm by avenue33 » Logged


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

Hi,
I'm using 4d systems' µOLED-128-G1 (SGC) display with the Serial_LCD library: http://embeddedcomputing.weebly.com/serial-lcd.html.

I have stumbled upon a problem with the uSD card. The size of the uSD card I am using is of 2 GB and I have partitioned it 50/50 into FAT and RAW components using 4d systems' RMPET Software Tool.

One of the attachments show what i get when verifying with the serial monitor. It detects the uSD card, however it does not detect the RAW or FAT components of the uSD card.


The following is the code that I have used:

Code:
///
/// @file colour_main.pde
/// @brief Example
/// @details
/// @n @a Example for Serial_LCD Library Suite
/// @n @a for 4D Systems uLCD-uLED-uVGA Serial_LCD Library Suite
/// @n on Arduino 0023 and 1.0, chipKIT MPIDE 0023, Wiring 1.0
///
/// @a Developed with [embedXcode](http://embedXcode.weebly.com)
///
/// @author Rei VILO
/// @author http://embeddedcomputing.weebly.com
/// @date Jul 12, 2012
/// @version release 132
/// @n
/// @copyright © Rei VILO, 2010-2012
/// @copyright CC = BY NC SA
/// @n http://embeddedcomputing.weebly.com/serial-lcd.html
/// @n http://github.com/rei-vilo/Serial_LCD
///
/// @see 4D Systems Goldelox and Picaso SGC Command Set
/// @n http://www.4dsystems.com.au/
///

// Core library - MCU-based
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__) // Arduino specific
  #if defined(ARDUINO) && (ARDUINO >= 100)
  #include "Arduino.h" // for Arduino 1.0
  #else
  #include "WProgram.h" // for Arduino 23
  #endif
#elif defined(__32MX320F128H__) || defined(__32MX795F512L__) // chipKIT specific
#include "WProgram.h"
#elif defined(__AVR_ATmega644P__) // Wiring specific
#include "Wiring.h"
#else // error
#error Platform not supported
#endif

#include "Serial_LCD.h"
#include "proxySerial.h"

// test release
#if SERIAL_LCD_RELEASE < 333
#error required SERIAL_LCD_RELEASE 333
#endif

// uncomment for I2C serial interface
//#define __I2C_Serial__

// === Serial port choice ===
#if defined(__I2C_Serial__) // I2C serial
  #include "Wire.h"
  #include "I2C_Serial.h"
  I2C_Serial mySerial(0);

#elif defined(__AVR_ATmega328P__) // software serial
  #if defined(ARDUINO) && (ARDUINO>=100) // for Arduino 1.0
    #include "SoftwareSerial.h"
    SoftwareSerial mySerial(10, 9);
  #else
    #include "NewSoftSerial.h" // for Arduino 23
    NewSoftSerial mySerial(10, 9);
  #endif

#elif defined(__32MX320F128H__) || defined(__32MX795F512L__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega644P__) // hardware serial Serial1
  #define mySerial Serial1

#else // error
  #error Platform not defined
#endif
// === End of Serial port choice ===

ProxySerial myPort(&mySerial); // hardware abstraction layer
Serial_LCD myOLED(&myPort); // LCD


void setup() {
  Serial.begin(19200);
  Serial.print("\n\n\n***\n");

  // === Serial port initialisation ===
#if defined(__I2C_Serial__)
  Serial.print("i2c\n");
  Wire.begin();
  mySerial.begin(9600);

#elif defined(__AVR__)  || defined(__AVR_ATmega328P__) | defined(__AVR_ATmega328P__)
  Serial.print("avr\n");
  mySerial.begin(9600);

#elif defined(__PIC32MX__)
  Serial.print("chipKIT\n");
  Serial1.begin(9600);

#endif
  // === End of Serial port initialisation ===
 
  myOLED.begin(8);
  /*
    // === Serial port speed change ===
    myOLED.setSpeed(38400);
  #if defined(__I2C_Serial__)
    mySerial.begin(38400);
 
  #elif defined(__AVR__)  || defined(__AVR_ATmega328P__) | defined(__AVR_ATmega328P__)
    mySerial.begin(38400);
 
  #elif defined(__PIC32MX__)
    Serial1.begin(38400);
 
  #endif
  // === End of Serial port speed change ===
  */



  delay(500);
  myOLED.initSD();
 
  delay(100);
  myOLED.gText(0, 50, "Checking the uSD");
 
  delay(1000);
  Serial.print("Check SD: ");
  Serial.println(myOLED.checkSD());
 
  delay(1000);
  Serial.print("Check FAT: ");
  Serial.println(myOLED.checkFAT());
 
  delay(1000);
  Serial.print("Check RAW: ");
  Serial.println(myOLED.checkRAW());
 
}


void loop() {
 
}


The rest of the attachments show the setup. I have connected the:
  • Screen +5V to Arduino +5V
  • Screen Ground to Arduino Ground
  • Screen TX to Arduino SoftwareSerial RX = pin 10
  • Screen RX to Arduino SoftwareSerial TX = pin 9
  • Screen RESET to Arduino pin 8

Any help is much appreciated, thank you!


* Capture.JPG (27.32 KB, 489x436 - viewed 43 times.)

* DSC00539.JPG (326.74 KB, 700x525 - viewed 57 times.)

* DSC00540.JPG (508.89 KB, 800x600 - viewed 61 times.)
Logged

Pages: 1 ... 9 10 [11] 12   Go Up
Jump to: