FailClock: Motivation to keep the code clean

My last project was the result of 2 needs coming together: Since some time I wanted to do something with electronics and recently I searched something interesting to push Continuous Integration. The idea was to have some kind of a counter on how many days we could maintain our code repository without a failure.

Failclock-SideI created a sign with the German text “Dieser Betrieb ist seit XXXX Tagen unfallfrei“. This is a common sign in bigger industry factories. The English version often says “This facility operates since XXXX days without accident“.

A version of this sign is also displayed in the Simpsons Intro.

How does it work?

Basically the sign consist of an Arduino UNO connected to an Adafruit 7 Segment Display along with one of their backpacks. It is connected via USB to provide power and a serial interface.

To control the sign I created Python scripts. They’re used to either synchronize the internal clock or to reset the counter.

Our Continuous Integration tool Jenkins provides a Notification plugin which sends JSON-encoded status updates as soon as a job finishes. I wrote a simple listener which analyses the Jenkins Notifications and calls the reset-script if needed.

I hosted all of the code, including the Arduino side, on Github. Feel free to reuse it. As it helps me learning everything I provided a lot of documentation directly in the sourcecode (this is especially the case in the Arduino code).

Due to the Adafruit Backpack the hardware-side was very simple. I simply had to connect 4 cables and shortcut another. You can see a good explanation on their site. Nonetheless it was interesting to do the soldering work, connect other electronic parts for testing purposes or to create a design on how to use the parts most efficiently.


I ordered the sign itself from a German poster-selling website. In their business category they also sell custom printed signs on a material called Forex. Wired cable and TESA hooks are used as spacers and hanger.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s