How-tos

How to build and IoT enabled foosball table

Share this post:

Republished from Colin McCabe’s Blog.


 

I joined IBM a few months ago, and had the opportunity to work on a week-long skunkworks project with our fabulous team. To demonstrate the Internet of Things (IoT) in action and the impact it has on the world of gaming, our IBM Cloud Technical Evangelists set out to combine a Raspberry Pi, a foosball table, and a plethora of Bluemix services into a new demo product. See our wrap-up video on YouTube.

IoT enabled foosball table

Our Inspiration for the Foosball Table

Before I get into the details, it’s important to look at the genesis of this initiative, and how it fits into a cloud-based IoT worldwide “league.” Our project was amongst others and proved to be a true global effort. The idea for IoT Foosball tables started across the Atlantic in Germany; covered in Sandy Carter’s Blog. Fabian Eitel and Marcel Seibold successfully created a Bluemix-powered table, that tweeted scores, and rated the team’s probability to win.

foosgermanyFabian and Marcel play Sandy Carter

Not to be outdone by our European colleagues (we love soccer -er- I mean football too), our team created our own version here in the US. The demo was written in Python and Node.js, all integrated on the Bluemix platform and leveraging best-in-class services like Twilio, Cloudant, and Watson. Check out our video here:

Our philosophy was to compliment the game of foosball, and not to interfere with casual gameplay. There was a need to automate the system, and have accurate sensors mounted to the table, all with Bluemix powering the system. Here are the features of this high tech table.

Features

  1. Personalized Tweets are announced for players and winners from our official Twitter handle, follow live games at @foosbuzz
  2. A responsive Web app, running on Bluemix, keeps score, shows leaderboard, and doubles as a real-time scoring display for TVs/projector. Check out the current games happening now, http://austin.foos.buzz
  3. Players can login with their LinkedIn id to get a Foosbuzz profile, and to show off wins and bragging rights
  4. An audio cheering section, powered by Watson, motivates players and celebrates wins
  5. An arcade-style hardware reset button featured on the table quickly starts new games

ca@Foosbuzz announces logins and gameplay

The Hardware

The excitement around IoT is that you can computerize any object, so why not a Foosball table? Attach sensors, interface with the cloud, and you can begin creating unique experiences for mobile users, and automate rich data collection. The team selected a Raspberry Pi micro-controller, small IR Sensors (to detect ball movement), and most importantly, a hackable foosball table that can be opened up and retrofitted for our use. Besides the addition of 15 feet of wiring, and a power cord, the equipment is minimal. The real challenge was to create an internal corridor for the ball to enter when there was a goal. After some woodwork at Home Depot, and some power-drilling under the hood, we successfully created a goal detection system. If there is a goal, the ball ricochets down the guided path, and Bluemix sees the goal via sensors. You can download our tutorial and Spec Document, and get granular details on the hardware side. Here is a sketch of what our system looks like.

foosball table sketch

 

The Code

Utilizing Node.js, with NodeRed, our visual coding engine, we were able to customize a system to meet the needs of the table (a basic goal sensor) and our web app platform. DevOps is critical in fast-tracked development processes, so we used Bluemix allowing our developers to see and edit the code on bluemix.net (30-day Trial). There would be no way to complete the project in time if we developed in a traditional way. Each member can login to see updated changes, and modify code. Acting as a true Swiss Army knife for apps, Bluemix also gives access to premium APIs, production deployment, and gives use of real-time goal data from the IoT Foundation.

Live scoreboard foosball table

Live Scoreboard for display, and mobile devices

Developing in this centralized way – combined with the “power tools” of server monitoring and admin, our team had a mission critical system to troubleshoot and upgrade with future enhancements. In other words, we were in business. Our code is open source, and you can see it here. We plan to help more cities create their own portals at city.foos.buzz , and be part of our gamer network. If you are interested, please tweet to @foosbuzz!

oo

Leaderboard tracks your wins with your Linkedin SSO

Game-on

We wanted a digital experience utilizing mobile. The site, austin.foos.buzz, acts as both the login, scoreboard, and leaderboard all in responsive design. There are important rules for this game, first to 5 wins, using house rules. In our IBM garage, we allow spinning, long possessions, and verbal taunting. Please follow your favorite rules. Most important: first to score 5 goals wins. Each new game is announced on Twitter for everyone online to cheer you on.

Worldwide Development Continues

With Germany and the US now on the map, the IBM global game effort continues with one of the best tables yet in São Paulo, Brazil. Produced by Vinicius de Morais (ja tecnologia), Victor Silva, and Monica Rufino for the Cloud Developer Bootcamp, this IoT Foosball table exudes style and function. Written in Python and C++, the code integrates with Bluemix IoT Foundation and four sensors. Having the additional sensors brings higher detectability with each goal.

asdfsadfdsa

The Brazil team utilized NodeRed, a flowchart controlled online tool

The finished foosball table

Look at that beautiful IBM Bluemix table!

Next up: We will be developing a new table with new special features in Nairobi, Kenya – the worldwide league continues to grow! I hope this inspires you to create your own cloud-enabled foosball table, all utilizing our best practices.

Special thanks to the Austin team: Oliver, Stefania, Vance, and Neeraja in creating this high-tech experience. We’ll see you on the field, or creating buzz on Twitter!

Save

More stories
May 1, 2019

Two Tutorials: Plan, Create, and Update Deployment Environments with Terraform

Multiple environments are pretty common in a project when building a solution. They support the different phases of the development cycle and the slight differences between the environments, like capacity, networking, credentials, and log verbosity. These two tutorials will show you how to manage the environments with Terraform.

Continue reading

April 29, 2019

Transforming Customer Experiences with AI Services (Part 1)

This is an experience from a recent customer engagement on transcribing customer conversations using IBM Watson AI services.

Continue reading

April 26, 2019

Analyze Logs and Monitor the Health of a Kubernetes Application with LogDNA and Sysdig

This post is an excerpt from a tutorial that shows how the IBM Log Analysis with LogDNA service can be used to configure and access logs of a Kubernetes application that is deployed on IBM Cloud.

Continue reading