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

Add Comment
5 Comments

Leave a Reply

Your email address will not be published.Required fields are marked *


Raj

this looks really cool would love to see this at colleges or even beer pong lol. I love working with node red too makes dev easy.

Reply

Colin McCabe

remkohdev

Any plans to add more sensors, i.e. gyrometer, motion to each player, the ball, etc to create some crazy big data?

Reply

    Tim

    Did you proceed with the topic? Open to outside-IBM-participants? Let me check if IBM Kassel has a table that could be enhanced as part of my thesis project…

    Reply

Colin

Thinking internal ‘Gaming’ Hackathon to create v.2

Reply
More How-tos Stories

Setting Access Control Policies for IBM Cloud Object Storage

As your organization explores more digital initiatives, including cloud and mobile, the importance of identity and access management (IAM) is paramount. Nearly all IT decision makers we talk with agree that IAM is essential to the success of their company’s cloud adoption and it is seen as a key enabler for mobility, analytics and IoT initiatives.

Continue reading

Home automation powered by Cloud Functions, Raspberry Pi, Twilio and Watson

Over the past few years, we’ve seen a significant rise in popularity for intelligent personal assistants, such as Apple’s Siri, Amazon Alexa, and Google Assistant. Though they initially appeared to be little more than a novelty, they’ve evolved to become rather useful as a convenient interface to interact with service APIs and IoT connected devices.

Continue reading

New tutorials to get you started with the IBM Cloud

Looking to build your next project on the IBM Cloud and not sure where to start?

Continue reading