As mentioned in previous log entry, the LPC1768 micro-controller weren't up for the task and I decided to switch to a Raspberry PI! Naturally there are pros and cons with this kind of solution, namely:
- Software implementation will be simpler as it will be possible to use a high level language such as Python.
- Iteration of the software will also be faster as it is just a matter of restarting a Python program, no need for flashing images to the micro processor, just SSH to the Raspberry PI.
- One negative aspect is that stock Raspberry PI images gives no guaranties of realtime performance.
- It is also an overkill solution, a Raspberry PI has way more power than needed, and why would you need an entire operating system when connecting to the internet and reflecting status on some leds.
With that the project was done, I wrote a quick and dirty Python script which connected to our Jenkins server, it polled the latest Job status and queue length. Bit banged the data to the WS2801 strip, one led for each job, and from the bottom of the strip I added one blue led for each 10 builds in the queue. The led color was mapped to reflect the status of the Jenkins job, green led for stable builds, orange led for unstable builds, and red for failing builds. There are a few other odd/uncommon job statuses, namely not-built and aborted, the color for these were. Ongoing builds were illustrated by flashing the led intensity.
All of this was done in two threads, one which polled the Jenkins server for current status, about every five seconds. The other handled updating of the led strip and animation of the flashing leds, this thread ran at 50hz for super smooth transitions.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.