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 and
4D-CD-00020 ViSi-Genie Magic Custom Slider with a Host


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.

Instructions:

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.

Note 1.A: Workshop 4 Pro is needed for this code example.

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 if not familiar with this step.



Attached Files