The Cuckoo Quack – The Arduino Hack

craig thumbnail

‘Three Men and a Marketing Lady’ modified an antique cuckoo clock into a new notification system for our Cyber-Duck office. The uniquely designed structure signals twitter, email and error message alerts and is an impressive new feature on the office walls.

Article by , Posted 3 years ago

The project

The essence of the reformed clock is that it enables everyone at Cyber-Duck to be notified with selected alerts. The cuckoo clock can be triggered by emails, tweets or by iRequire and Floodgate notifications. This information is fed through a Raspberry Pi and Arduino to trigger the “cuckoo” of the clock and attract the attention of anyone in the office. The ‘Cuckoo Quack’ was also modified with an LCD screen showing the message notification as well as flashing LED lights in the eyes of carefully selected rubber ducks.

The project was divided into four main parts:

  • Construction of the Cuckoo Quack clock (Jenni and I)
  • The API and the Arduino boards (Benjamin)
  • The Control centre (Alex)
  • Website interface (me)

Technologies used

We wanted our machine to be as flexible as possible, and controlled remotely via the web. These technologies helped out:

  • Firmata library loaded on 2 Arduinos (Since the LCD screen required the use of a complete Arduino to function properly, we also had to find a way to control two different Arduino boards from the same server).
  • Node.js server built with Sails.js framework, running on Raspberry Pi (with Raspbian Linux distribution).
  • Johnny-Five node module.

Challenges

With Jenni, I faced a challenge from the outset of the project that I hadn’t anticipated – finding thin plastic yellow ducks! We also faced challenges in constructing the shelf for the flashing ducks to sit on. After an afternoon brushing up our carpentry skills through hours of sawing, sanding, gluing and painting, the structure of the Cuckoo Quack was complete.

One of the challenges Benjamin faced was to encapsulate the Javascript into a RESTfull API, in order to control the Cuckoo Quack via the web by sending JSON objects via simple POST requests to the server. Alex also encountered problems syncing the Raspberry Pi to the web server, however these difficulties were eventually resolved and the team was able to deliver the project within the limited time frame.

How the app works

When the API receives a command, the server sends instructions to our boards to send a signal to the real world:

  • Triggering the cuckoo out and in, specifying the length of the pause between the 2 actions
  • A series of LED effects on one or multiple ducks: on, off, blink or strobe for a specific amount of time
  • Display some text on the LCD screen

All events can be triggered simultaneously since the whole application is asynchronous.

Cuckoo Quack Schema

The API is hosted on the Raspberry Pi, with a network connection and USB connection to the two Arduino boards.

 

Cuckoo Quack API

The web app interface controlling the Cuckoo Quack.

Result

‘Three Men and a Marketing Lady’ were voted the winners of the Cyber-Duck Hackathon. The Cuckoo Quack worked like clock-work in the presentation and amazed the rest of the Ducks by receiving emails, tweets and a notification using the API of the iRequest app that was also created over the weekend. It has now been mounted onto the wall and is ready to use for live client projects.

This project was created as part of the Quack Hack Hackathon, where the team created 6 projects in the space of 32 hours. Find out more about the project here.

Let's work together

Our interdisciplinary team can work as an extension of yours - we would love to hear your ideas.

Discuss a project