Go Down

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

Graynomad

Rob Gray aka the GRAYnomad www.robgray.com


avenue33

The new Serial_LCD release 15 brings faster dialog box -- twice as fast as previously -- and the long awaited-for readPixel function to get the colour of one pixel.

Code: [Select]
***
Serial uLCD-32PT 1 10 19 32 24

FULL screen
saveScreenSD  2679 ms
readScreenSD  623

AREA screen
saveScreenSD  1449
readScreenSD  343


As always, more details on my website.

Graynomad

There is a thread running at the moment where we were talking about having animated gauges by blitting graphics from the SD. I said I wasn't sure if the 4DS screen did that fast enough. Do you have any numbers for that?

I gather your saveScreenSD is a loop that reads all the pixels and writes them to SD and readScreenSD does the reverse?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

avenue33


I gather your saveScreenSD is a loop that reads all the pixels and writes them to SD and readScreenSD does the reverse?


Actually, in both cases, it is a single command sent to the screen and the whole process is handed by the screen controller.

Graynomad

So it's too slow for animation then.

I assume then that you are drawing your dials with shapes. Does that look real time with no jitter or blinking?

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

extent

I'm pretty sure that the Picaso controller is faster than the Goldelox controller in the smaller displays, so that will be a lot less flicker than what I've experienced in my own tests.  My original plan for fancy dials was going to be pre-rendering every possible frame of the dial and saving it out to the SD card, then using the render image function to bring the required frame to the screen.  Like blitting but without a mask.  Rendering an image off the SD card is very fast, much closer to the speed of rendering a plain square, and since the whole frame overwrites the original pixels on the screen you can do it without a blanking pass to eliminate flicker.  You could still use that system on the Picaso screens to increase your frame rate even beyond what you can do with direct drawing.

You could conceivably write a complete image frame to the SD card with a block transfer and then render it to the display.  It would be flicker free but framerate would suffer greatly and you'd have to have enough SRAM to buffer the entire rendered image.  Still the closest you could get to real page flipping.

avenue33

The release 16 includes new colour functions.

  • readPixel returns the 16-bits coded colour from the specified pixel

  • setColour converts red, green, blue values into a 16-bits colour

  • splitColour just does the opposite

  • halfColour halves the colour, very handy for buttons



As always, comments and code are here!

avenue33

I added a new branch with Arduino 1.0 implementation for the Serial_LCD project.

Beware: The libraries included on the 1.0 branch are no longer compatible with Arduino 0022.

The legacy library for Arduino 0022 and chipKIT mpide 0022 remains on the master branch.

Enjoy :)

Science

Some of the Photos for this display show a bar with icons under the display, some just show a black bar...
So does it have icons or not? And can i use them? (Are there functions in the lib for it?)

avenue33

Hi,

My display doesn't have those icons and the documentation from 4D Systems doesn't mention them.



Feel free to raise your question at the 4D Systems forum.

Science

Thanks.
Do i need to use spi ports for communication? Because i want to use the ethernetshid with it too,
But it would use pins 13-10 i think. So would it still be possible?

avenue33

Connection between the 4D Systems screen and the Arduino is serial.

May I suggest you to read the available documentation?

Also, I provide tutorials on my website.

Enjoy :)

avenue33

Here's the Roadmap for Serial_LCD and the features I plan to integrate in future releases for 4D Systems µLCD32(SGC) and µLCD43(SGC) screens.

avenue33

Release 22 of Serial_LCD for 4D Systems (SGC) LCD touch-screens brings a new high-level GUI library with:
button,
dialog window,
menu and
label.



Also includes:
• max vertical and horizontal according to orientation
• (x0, y0, dx, dy) coordinates system added to (x1, x2, y1, y2) = (x0, y0, x0+dx, y0+dy)
• readTextFile from sebgiroux --merci !
• RAW mode for faster screen copy to/read from SD card

Enjoy :)

Go Up