Skip to content

ViSi-Genie: Arduino Screen Saver

Introduction

This code example presents a working ViSi-Genie-Arduino application wherein the backlight of the display module is turned off (contrast or brightness is set to zero) after a predefined period of time.

To understand this codebase example more quickly, please read first the code example:

ViSi-Genie: Arduino Form Navigation

The ViSi-Genie Communications Protocol provides a function for controlling the contrast or brightness of the display. From section "3.1.3.5 Write Contrast Message" of the ViSi-Genie Reference Manual.

The host issues the Write Contrast command message when it wants to change the contrast or brightness of the display. Certain power saving modes and applications may require the host to dim or completely turn off the backlight.

Note

Contrast value of 0 will turn the backlight OFF. Any non 0 value will turn the backlight ON.

The datasheets of 4D display modules describe a relevant fact in the Display Precautions section:

Avoid having to display the same image/object on the screen for lengthy periods of time. This will cause a burn-in which is a common problem with all types of display technologies. Blank the screen after a while or dim it very low by adjusting the contrast. Better still; implement a screen saver feature.

Below are additional notes from the PICASO Internal Functions Reference Manual.

LCD MODULES:

contrast 0 = display OFF, non-zero = display ON

EXCEPTION:

  • uLCD-43 supports Contrast values from 1-15 and 0 to turn the display off.
  • 3202X-P1 support Contrast values from 1 to 9 and 0 to turn the display off.

Below are additional notes from the DIABLO-16 Internal Functions Reference Manual.

LCD MODULES:

contrast 0 = display OFF, 1-15 = contrast level (Actually backlight brightness)

Below are the assitional notes from PIXXI Internal Functions Reference Manual

LCD MODULES:

contrast 0 = display OFF, 1-15 = contrast level

Prerequisites

This codebase example assumes the reader can program the 4D Systems display module using Workshop4 IDE ViSi-Genie environment. Beginners are advised to read the following aplication notes.

Instructions

This code example has two parts - the ViSi-Genie Magic project and the Arduino sketch. Below were the steps involved in creating this code example:

  1. Create the ViSi-Genie project. The following are the "main" objects of the project:

    1. Form0 - configured to report a message. On Form0 are:
      • 4Dbutton0 - configured to report a message, momentary property set to "No"
      • Winbutton0 - configured for navigating to Form1
      • Leddigits0 - for displaying time
    2. Form1 - configured to report a message. On Form1 are:
      • Slider1 - configured to report a message
      • Winbutton1 - configured for navigating to Form2
      • Leddigits1 - for displaying time
    3. Form2 - configured to report a message. On Form2 are:
      • 4Dbutton1 - configured to report a message, momentary property set to "No"
      • 4Dbutton2 - configured to report a message, momentary property set to "No"
      • Winbutton2 - configured for navigating to Form0
      • Leddigits2 - for displaying time
    4. Form3 - the screen saver form. When this form is activated, the display brightness is set to 0
      • Winbutton3 - configured to report a message
  2. Compile the Genie project and upload the program to a uLCD-32PTU or any 4D Systems displays with PICASO, DIABLO-16, PIXXI-28 and PIXXI-44 graphics processors. Copy the supporting files to a uSD card mounted to the PC. Properly unmount the uSD card from the PC and mount it to the target display.

  3. Compile and upload the attached sketch to an Arduino Uno. The sketch uses a software serial port for the display.

  4. Properly connect the Arduino Uno to the uLCD-32PTU. See the application notes ViSi-Genie: Connecting a 4D Display to an Arduino for this.

Attachment

Project File