Jump to content
Rei Vilo

[Energia Library] LCD_screen Library Suite

Recommended Posts

Hi!

 

I've decided to consolidate the libraries I've developed for different screens into a single one, the LCD_screen Library Suite.

post-12238-0-27949900-1369841190_thumb.jpg

Download with examples and documentation is available here. The library runs on the LaunchPads MSP430 and Stellaris with Energia 0009. 

 

As at today, the following screens are supported:

I also leverage the high-level libraries I wrote for the 4D Systems screens, for example this clock that literally requires two lines of code:

post-12238-0-49227500-1369841203_thumb.jpg

myClock.define(&myScreen, 160, 120, 60);
myClock.draw(hour, minute, second, "Message");

Enjoy :smile:

Share this post


Link to post
Share on other sites
Actually, yes thanks to the modularity of the library.
 
You only need to
  • create a new class for the Nokia 1202 derived from the LCD_screen_font class
  • write the four specific functions inherited from the pure virtual functions:
LCD_screen_font(); // constructor with initialisation code
void _setPoint(uint16_t x1, uint16_t y1, uint16_t colour); // draw a single point
void _fastFill(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t colour); // for faster area display
void _getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0); // if touch available, otherwise false = (0, 0, 0)

Optionally, you can add more functions to bring new features and speed up display.

Share this post


Link to post
Share on other sites

Quick question -

 

I see a bunch of examples in the library which is awesome, however I notice that for instance the gauge examples are asking for files which are not present in the zip file.  Am I missing something, or is the zip file missing something?

 

Also, so far, I like the library Rei...great work!

 

 

L293D

Share this post


Link to post
Share on other sites

Wow, this looks great.  I have been working on a menu library, and had made some changes to you previous library to support it.  However, it looks like you have made similar changes for this library, so I will convert over and make the menu library available when it is functional.  

 

Thanks for all your hard work, its fantastic.  

 

David

Share this post


Link to post
Share on other sites

You're welcome!

 

I plan to implement the GUI I've developed for other screens, including label, dialog box, menu, ...

 

For more details, see http://embeddedcomputing.weebly.com/gui.html

 

post-12238-0-33667400-1369993567_thumb.jpg post-12238-0-49023300-1369993576_thumb.jpg post-12238-0-42317400-1369993560_thumb.jpg

 

The only missing element is adding extra-RAM and/or SD-card to save what's behind the dialog box and the menu.

Share this post


Link to post
Share on other sites

Quick question -

 

I see a bunch of examples in the library which is awesome, however I notice that for instance the gauge examples are asking for files which are not present in the zip file.  Am I missing something, or is the zip file missing something?

 

Also, so far, I like the library Rei...great work!

 

You're welcome!

 

The gauge object needs some polishing before being released.

 

Stay tuned!

Share this post


Link to post
Share on other sites

Rei -

 

   You mentioned needing to add extra ram to allow saving what is behind dialog boxes etc....I have been meaning to ask you if there would be a way to use your SPI RAM library to do just that?  Specifically, there is a really great graphics library for the Nokia 5110, the only thing keeping it from running on the MSP430 is that it needs a screen buffer that is 504 bytes...and the 512 on the 2553 just is not enough.  Would there be any issue with using the SPI RAM library for this?

 

L293D

Share this post


Link to post
Share on other sites

@L293D FYI, for non-Energia projects, you can use UCLCD library, which has memory routines that work with my LCD booster packs (the ones that have optional memory.)

Share this post


Link to post
Share on other sites

Rei -

 

   You mentioned needing to add extra ram to allow saving what is behind dialog boxes etc....I have been meaning to ask you if there would be a way to use your SPI RAM library to do just that?  Specifically, there is a really great graphics library for the Nokia 5110, the only thing keeping it from running on the MSP430 is that it needs a screen buffer that is 504 bytes...and the 512 on the 2553 just is not enough.  Would there be any issue with using the SPI RAM library for this?

 

L293D

 

I always explore each part of a project separately before merging them. So the SPI RAM library was just a step to LCD_screen.

 

Now, for not many more $ than the Nokia 5110, you can have the HY28A that features 320x240 pixels, colour, touch and a really fast controller, all that for just USD12!

Share this post


Link to post
Share on other sites

You're welcome!

 

I plan to implement the GUI I've developed for other screens, including label, dialog box, menu, ...

 

 

Ok, I will wait. I had planned not to include storage of background ... For simpler UIs one doesn't need it, but having that is great. Is you code somewhere?

 

David.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×