The counter’s”prototype”. It’s a really simple design, just two buttons, LEDs, resistors and a couple of wires.
Have you already noticed a speedometer at our homepage that shows some juicy stats from the netguru’s week?
Getting the info about the number of commits or automated developments is fairly easy but how the heck do we count the coffee cups or sandwiches? We could insert it manually but… well, no, too boring. We could just put the estimated number. Still too boring.
So… why not to play a bit with Raspberry Pi and bring “the Counter” to live?
The idea is very simple: we press a button and send a request to our website which then increases The Sandwich/Coffee Count. The design isn’t much harder than that - thanks to RaspberryPi we can build a very basic circuit (power -> button -> line out to RPi -> LED -> resistor -> ground, it doesn’t get much simpler than that) and then just “catch” the signal and voila! RPi sees the signal and fires out a POST request.
You can take a look at the used script at github.com/MSzweda/Clicker
Soldering - work in progress
The schematic — Wiring the buttons and LEDs — Connected to RaspberryPi
Red button - coffee. Blue button - sandwich. Yeeey!