uLCD Screensaver

Overview

This is an extension to the 4DGL-uLCD-SE library. By utilizing the mbed RTOS, the uLCD enters and exits screensaver mode based on a refresh timer. The screensaver thread saves the previous contents of the LCD screen before playing an animation.

/media/uploads/jdanner3/wp_20150312_20_46_40_pro.jpg

Heavy modifications were made to many files within the original 4DGL-uLCD-SE library. For this reason we have elected to include a simple import program option, rather than posting raw code. The largest modification is the addition of the uLCD_Screensaver.cpp file, which contains the core functionality of the program.

uLCD_Screensaver.cpp monitors LCD uptime to determine when to enter screensaver mode. Upon entering screensaver mode, the current screen state is saved and an animation plays. After the 'refresh' pushbutton is pressed, the animation halts and the previous screen state is rewritten to the LCD.

Existing issues:

  • Color accuracy is limited by the existing uLCD class. Currently, the read_pixel() method returns a 16 bit color value, where pixel() uses a 24 bit color value to write.
  • Performance is limited by lack of RAM. Because of this, the method that saves the screen state before playing the animation can take a large amount of time. The workaround involves saving the screen state into a text file on an SD card and reading from that file to restore.

Components Required

Wiring

uLCD

Component pinmbed pin
+5VVU
RXp27
TXp28
GNDGND
RESp30

Pushbutton

Component pinmbed pin
Highp21
LowGND

microSD Breakout

Component pinmbed pin
CSp8
DIp5
VCCVOUT
SCKp7
GNDGND
DOp6

Project

Import programuLCD_screensaver

screensaver extension to uLCD

Import library4DGL-uLCD-SE

Extended library to include a screensaver

Demonstration


Please log in to post comments.