Skip to main content
  1. Projects/
  2. Archive/

RotorDisplay

This is an old project that I don’t maintain or support. It’s listed here for archival purposes only, as it still might be useful to someone.

The RotorDisplay is a rotating display built by Stefan Heindel. It features a 200 x 18 pixel display realized by two opposite rotating “wings” with 9 LEDs each. Look here for details (in German).

I wrote the RotorDisplay Control Application to interface the RotorDisplay from a computer. It allows to send images and text to the RotorDisplay and even has a simple built-in scripting language.

RotorDisplay Control Application (Java 5 required) #

RotorDisplay Control Application

Source Code #

I wrote most of the code in 2005, after attending an introduction level course on Software Engineering. I’m aware that few, if any, are building their own RotorDisplay. Despite this, some people may find it useful to have a look at the source code and learn something from it. I personally learned a lot by writing this application. Most of it was written on a Mac and could never be tested (due to the lack of a COM port). That’s the beauty of Java: Develop and compile on a Mac, run it on Windows or Linux :).

Looking back at the code now, I would’ve done a lot of things differently. Just to name a few:

  • (Strict) separation of Model, View, Controller classes
  • Get rid of bloated controller class “InputController”
  • Resource Management

If I was writing the application from scratch again, I would use more third party libraries. Recently I found AppFramework, which “is a small set of Java classes that simplify building desktop applications”. It provides “Application lifecycle, notably GUI startup and shutdown.”, “Support for managing and loading resources”, “Support for defining, managing, and binding Actions”, “Persistent session state”. But have a look for yourself if you’re interested.

Dealing with low level access to hardware is also not the best scenario for using Java. Additionally, Java only supports signed bytes which can be annoying.

I used JavaCC to generate the parser for the built-in scripting language. For a list of the supported commands and their usage, have a look at the grammar definition in the file “RDScript.jj” in the package “controller.script”.

The source code is available under the MIT license. I got the icons, used in the toolbar, somewhere from the web but I forgot where. I hope I don’t violate any copyrights. The RXTX library (LGPL 2.1 license) is used for data transfer because it allows access to COM ports under various operating systems.

7 comments #