Extended library to include a screensaver

Dependencies:   SDFileSystem

Fork of 4DGL-uLCD-SE by Jay Danner

Embed: (wiki syntax)

« Back to documentation index

uLCD_4DGL Class Reference

uLCD_4DGL Class Reference

Example: More...

#include <uLCD_4DGL.h>

Public Member Functions

void cls ()
 Clear the entire screen using the current background colour.
void reset ()
 Reset screen.
void baudrate (int speed)
 Set serial Baud rate (both sides : screen and mbed)
void background_color (int color)
 Set background colour to the specified value.
void textbackground_color (int color)
 Set screen display mode to specific values.
void display_control (char mode)
 Set screen display mode to specific values.
void set_volume (char value)
 Set internal speaker to specified value.
void circle (int x, int y, int radius, int color, bool isScreenSaverCommand=false)
 Draw a circle centered at x,y with a radius and a colour.
void checkActiveScreenTime ()
 Screensaver functions for the uLCD_4DGL.
void setActiveScreenInterval (int newInterval)
 Set the timeout interval for active screen.
int getActiveScreenInterval ()
 Get the timeout interval for active screen.
void reportScreenInteraction ()
 Whenever a change is made to the LCD screen that is not part of the screensaver graphics method, it is reported and the last screen activity time is updated.
bool isInScreensaverMode ()
 Return whether the LCD is currently in screen saver mode.
void enableScreensaverMode ()
 Initialize the screen saver.
void exitScreensaverMode ()
 Close the screen saver.
void backupStateOfScreen ()
 Backup the current pixels of the display to the sd card.

Detailed Description

Example:

 // Display a white circle on the screen
 #include "mbed.h"
 #include " uLCD_4DGL.h"

 uLCD_4GDL myLCD(p9,p10,p11);

 int main() {
     myLCD.circle(120, 160, 80, WHITE);
 }

Definition at line 208 of file uLCD_4DGL.h.


Member Function Documentation

void background_color ( int  color )

Set background colour to the specified value.

Parameters:
colorin HEX RGB like 0xFF00FF

Definition at line 354 of file uLCD_4DGL_main.cpp.

void backupStateOfScreen (  )

Backup the current pixels of the display to the sd card.

Definition at line 66 of file uLCD_Screensaver.cpp.

void baudrate ( int  speed )

Set serial Baud rate (both sides : screen and mbed)

Parameters:
SpeedCorrect BAUD value (see uLCD_4DGL.h)

Definition at line 206 of file uLCD_4DGL_main.cpp.

void checkActiveScreenTime (  )

Screensaver functions for the uLCD_4DGL.

Determine if the screensaver should be shown

Definition at line 8 of file uLCD_Screensaver.cpp.

void circle ( int  x,
int  y,
int  radius,
int  color,
bool  isScreenSaverCommand = false 
)

Draw a circle centered at x,y with a radius and a colour.

It uses Pen Size stored value to draw a solid or wireframe circle

Parameters:
xHorizontal position of the circle centre
yVertical position of the circle centre
radiusRadius of the circle
colorCircle color in HEX RGB like 0xFF00FF

Definition at line 26 of file uLCD_4DGL_Graphics.cpp.

void cls (  )

Clear the entire screen using the current background colour.

Definition at line 183 of file uLCD_4DGL_main.cpp.

void display_control ( char  mode )

Set screen display mode to specific values.

Parameters:
modeSee 4DGL documentation
valueSee 4DGL documentation

Definition at line 388 of file uLCD_4DGL_main.cpp.

void enableScreensaverMode (  )

Initialize the screen saver.

Definition at line 30 of file uLCD_Screensaver.cpp.

void exitScreensaverMode (  )

Close the screen saver.

Definition at line 41 of file uLCD_Screensaver.cpp.

int getActiveScreenInterval (  )

Get the timeout interval for active screen.

Definition at line 56 of file uLCD_Screensaver.cpp.

bool isInScreensaverMode (  )

Return whether the LCD is currently in screen saver mode.

Definition at line 61 of file uLCD_Screensaver.cpp.

void reportScreenInteraction (  )

Whenever a change is made to the LCD screen that is not part of the screensaver graphics method, it is reported and the last screen activity time is updated.

Definition at line 22 of file uLCD_Screensaver.cpp.

void reset (  )

Reset screen.

Definition at line 134 of file uLCD_4DGL_main.cpp.

void set_volume ( char  value )

Set internal speaker to specified value.

Parameters:
valueCorrect range is 8 - 127

Definition at line 427 of file uLCD_4DGL_main.cpp.

void setActiveScreenInterval ( int  newInterval )

Set the timeout interval for active screen.

Definition at line 51 of file uLCD_Screensaver.cpp.

void textbackground_color ( int  color )

Set screen display mode to specific values.

Parameters:
modeSee 4DGL documentation
valueSee 4DGL documentation

Definition at line 371 of file uLCD_4DGL_main.cpp.