Skip to content

ViSi-Genie Magic: Arduino Custom Slider


To understand this codebase example more quickly, the reader is advised to read and understand first the following codebase examples:

4D-CD-00019 ViSi-Genie Magic Custom Slider is a custom slider implementation using the Magic Move and Magic Code objects.

4D-CD-00020 ViSi-Genie Magic Custom Slider with a Host is an improved version of 4D-CD-00019 ViSi-Genie Magic Custom Slider, where in the program sends a REPORT_EVENT message to the serial port every time that a touch release action is detected on the custom slider object. A REPORT_EVENT message is also sent to the serial port every time that touch goes out of the area covered by the custom slider.

This codebase example (4D-CD-00021 ViSi-Genie Magic Arduino Custom Slider) presents a sketch for an Arduino program that will interact with the ViSi-Genie custom slider application in 4D-CD-00020 ViSi-Genie Magic Custom Slider. The Arduino program receives and evaluates the messages from the ViSi-Genie program running on the display module. The current state or level of the custom slider object is then printed to the serial monitor of the Arduino IDE.


Worskhop 4 PRO is needed for this codebase example.

Video Demo 1

Video Demo 2


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.


  1. Compile the attached ViSi-Genie Magic project and upload the program to a uLCD-32PTU (or to your target display). 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 uLCD-32PTU.

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

  3. Properly connect the Arduino Uno to the uLCD-32PTU. See the application notes - ViSi-Genie: Connecting a 4D Display to an Arduino if not familiar with this step.


Project File