Skip to content

ViSi-Genie Magic: Three State Momentary Button


This codebase example demonstrates the implementation of a custom three-state momentary button in ViSi-Genie. The custom three-state momentary button is created using a user button object with three frames. The behaviour of the user button in response to touch is then modified using the following magic objects:

  1. Magic Move
  2. Magic Release
  3. Magic Touch

The state of the custom button is sent to the serial port as a REPORT_OBJ message.

In the standard ViSi-Genie environment, the above is not possible since the behaviour of a user button is internally managed by a ViSi-Genie program. The magic objects in Workshop Pro however allow the user to have more control of a ViSi-Genie program.


Worskhop 4 PRO is needed for this codebase example.


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 project and upload it to any 4D Systems displays with PICASO, DIABLO-16, PIXXI-28 and PIXXI-44 graphics processors in this codebase example we are using uLCD-32PTU. Copy the supporting files to a uSD mounted to the PC. Properly unmount the uSD card from the PC and mount it to the target display.

  2. Open GTX Tool from Tools > GTX to show the behaviour of the user button in response to the touch.


Project File