A Genie for Your Arduino Sketch
The last iteration of Workshop, the official IDE for 4D Systems screens brings an outstanding surprise: ViSi-Genie.
ViSi-Genie provides a graphical environment to literally draw a user interface on the screen. Adding a button, a slider or more sophisticated GUI elements as a meter, a keyboard, and even a video-player, is done with just a drag-and-drop. |
Each element of the user interface is event-driven.
Basic events are onChanging (continuous) and onChanged (when the touch is released). Actions are associated to events. In this example,
What is really interesting here is the screen manages everything, even updating the elements displayed. No Arduino code is required to refresh the meter with the latest value set by the slider. |
The built-in debugger allows to test the just designed interface and more importantly, record the messages sent from the screen to the Arduino.
Trackbar Change 16:18:03.673 [07 05 00 00 2F 2D] The structure of the messages sent by the screen is explained in the Reference Manual. Last byte is a check-sum to ensure the message consistency. Each object is presented with an example on a dedicated Application Note. Two examples –one for Arduino and another for chipKIT– are supplied, with all the relevant code. |
Connection to the Arduino board is done through a standard serial port at 9600 bauds.
One function read the messages from the screen and performs the check sum. The main loop executes the commands with the corresponding values. |
SoftwareSerial mySerial(2, 3); |
Download the Arduino sketch and the ViSi-Genie project.
Links to |
![]()
|
In conclusion, the new release of Workshop brings exciting features to 4D Systems screens and processional-looking interface to Arduino sketches, for free!
|
Pros
|
Cons
|
Wrap-Up
|