Category: Featured

Reading Buttons of a LCD Keypad with Arduino

The LCD Keypad shield from dfrobot is a nice way to get a display and some buttons for an Arduino board. Unfortunately the reading of  button presses does not reliably work with the standard software (LCDKeypad). The alternative keygrabber library seems to be incomplete and did not work for me. The dfrobot forum lists some interesting approaches, so I decided to make my own library.

The LCDButtons library is hosted on github. It can be used as a replacement for LCDKeypad. The button() method works different: if a value is read that indicates a key press the reading is repeated until two consecutive values make the same key. The delay between the readings can be configured. Optionally the function can wait until the button is released.


Modelica Conference 2012

The conference is over now, it was pretty interesting. My paper about the usage of ncDataReader2 with Modelica is linked at the publications page.


Polygon | new versions 2.0.5 and 3.0.5

Polygon logo

I released new versions of my python package for polygon handling. The changes contain only bug fixes, no new features were added:

  • fixes some issues with recent versions of NumPy
  • fixes some issues with recent versions of Python 2 and 3
  • NumPy support is enabled by default now

Source and binary Packages for Python 2 and 3 will be available on GitHub and PyPI soon.


DyMat | version 0.5 reads more file formats

DyMat_logoVersion 0.5 of my package DyMat has been released. Read access to different file structures has been implemented. The new version will be able to read most mat files written by dymola.

DyMat should still be handled as beta software, it may have some bugs!


Binary Toy for the Museum of Technology, Berlin

My first larger project using the Arduino platform is an exhibit for the German Museum of Technology in Berlin. It will be shown in the Konrad Zuse exhibition.

The device shows a random number (left display). By activating the correct bits in a binary representation (center display) the visitor has to assemble this number (right display). From a programmers point of view this is really not a big deal, but for most people this can be a challenge.

This device was created in cooperation with Felix Scharstein who has a long experience in objects and machines for museums. An article on a more mechanical device for the same exhibition will follow soon.

Technical Facts

The device is controlled by an Arduino Duemilanove. All buttons are connected to digital inputs: eight buttons for the digits, two buttons to increase (+1) or decrease (-1) the number and one button to request a new random number. The front panel was made from white Corian.

The displays consist of 14 single 7-Seg-modules (Kingbright SA10-21GWA) connected to two MAX7221 controllers. One controller drives the center display, the other drives the left and right display. The controllers are cascaded and connected to the Arduino using a serial interface (3 pins). The Arduino library LedControl is used to control the displays from the software. By using this excellent library the main program can be kept really small and simple (~150 lines). The program logic is trivial, no special programming skills were required.

All wiring was done by hand (~800 soldered joints). This was a hard job, but finally everything is working. The device will be installed in the museum in the next weeks.

Many thanks to the creators and contributors of Arduino and LedControl!