The 4Display-Shields come complete with the integrated 4D Systems OLED or LCD display module, a 5-way multi-switch joystick, and male headers that help connect the 4Display-Shield to the Arduino Boards. The 5-way joystick is connected to the Arduino D2, D3, D4, D5 and D6 pins, and communication between the 4Display-Shield and the Arduino takes place via the Serial UART. The included display module0,s ranging from tiny 0.96” form factor up to 1.7” full colour OLED screen, include a tiny yet powerful GOLDOX graphics controller chip and a micro-SD connector that supports standard and HC memory cards, which can be used for storing images, icons, video clips and data.
The display modules can be configured to run under two different operating modes when interfaced with Arduino using the 4Display-Shields – Serial Platform Module (SGC) and 4DGL Platform Module (GFX). Switching between the two modes is done via a simple software update.
The SGC mode turns the embedded GOLDEOX chip into a slave device and the Arduino becomes the host controller allowing users to develop graphics applications using the Arduino development environment and software tools. With a few bytes of serial data sent from the Arduino users can quickly and easily draw lines, circles, text and even display images and play video clips on the screen. Whilst the SGC platform resources are abundant, 4D Systems is also developing dedicated serial command libraries for the Arduino, which will be available soon.
The GFX mode turns the embedded GOLDELOX chip into a stand-alone device where all application code is written in 4DGL (4D Graphics Language) that has syntax similar to popular languages such as BASIC, C and Pascal. Using 4DGL allows users to take complete control of all resources available on each display module such as the Serial Port, the graphics display, the micro-SD card and access to the I/O pins. This gives the possibility to offload a lot of overhead from the host processor by creating the ‘work horse’ objects within the display module itself. For example, for a game of Tetris, entire functions that can be created in 4DGL and triggered with simple serial commands from the host instead of sending all graphics objects as serial graphics primitives. This gives the users the possibility for a neat division between the graphics functions and the game itself, allowing swift changes in the game’s appearance without altering the main Arduino game code. A comprehensive IDE that includes an editor, compiler, linker and downloader is provided free of charge for developing complete 4DGL applications.