Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

We cannot remember your choice unless you click the consent notice at the bottom.

How to convert a mini-arcade machine into a Grafana dashboard display with Raspberry Pi

How to convert a mini-arcade machine into a Grafana dashboard display with Raspberry Pi

2022-09-22 4 min

When COVID-19 hit, Yonatan Mevorach faced an unexpected challenge, which required an unexpected solution.

The Infrastructure Team Lead at Wix, the popular website building platform, was accustomed to looking at multiple monitors on the walls of the software company’s offices in Tel Aviv, Israel. These monitors cycled through Grafana dashboards to help the team keep tabs on Wix’s many services. “While we’re working from the office throughout the day, we literally keep an eye on our data,” Mevorach said. “When there is an issue, we can catch it and prevent any actual problems for our users.”

Wix had just launched a new service, and Mevorach wanted to pay extra attention to the corresponding dashboards so they could fine-tune their metrics and limits. But there was just one problem: Suddenly quarantined and working from home, Mevorach was down to just one monitor. 

In his recent GrafanaCONline 2022 talk, titled “A beginner’s guide to hacking electronics to display Grafana dashboards,” (available on demand now)  the web developer described how he had to get creative when the traffic started to roll in for this new service.

“I looked around my desk and I thought, ‘I really miss having this extra monitor just for Grafana,’ especially at this crucial time for this new service,” Mevorach said. “And I noticed that I have this mini-arcade machine branded from Wix Engineering that we got from one of our internal conferences.” 

Mevorach had a self-described “eureka moment” looking at the arcade machine’s tiny screen. What if he could convert it to a Grafana monitor? It seemed unrealistic, but he went with his initial instinct anyway, especially because he knew coworkers had the same arcade devices sitting at their desks. He got approval to return to the office to pick up the machines and went to work. “They were fine with me taking some of their machines home and tearing them apart just to see if I could kind of guess my way through how they work,” Mevorach said.

Reverse engineering a Grafana dashboards display

Even though Mevorach had never hacked an electronic device before, he began his journey to reverse-engineer the machine to display Grafana dashboards. First, he separated its components to see what he could re-use — and what he needed to replace, like the original CPU.

He also wanted it to be programmable and connected to the internet so the modified version wouldn’t be limited by batteries. That’s when he brought in the Raspberry Pi Zero as the “new brains of my machine,” Mevorach said. “It’s something that I can write code for and program. It connects to power via USB so it can be always on and it can power other electrical components that I connect to it.” Plus, it would have access to the internet via Wi-Fi. 

Solving the pin mystery

Next, he examined the circuit board, which contained a series of 10 pins connected via a ribbon cable to the main controller of the arcade machine. “I determined that each pin is associated with one button, except there was a mystery pin connected to all the buttons via the perimeter,”  Mevorach said. A Google search revealed that it was the ground pin that completed the electrical circuit.

He researched “Hello, World!” coding programs to connect a Raspberry Pi to any button. “The straightforward way of connecting it is to connect one and one pin on the button to one of the GPIO pins (general-purpose input/output) pins on the Raspberry Pi,” said Mevorach. 

He also decided to swap in a 2.4-inch LCD screen with the same form factor, which came with a guide explaining how the LCD buttons should be connected to the pins on the Raspberry Pi. Because the code was in Python and Mevorach is mainly a JavaScript user, he ended up porting the Python code to JavaScript. “This helped me understand a little bit about how these display drivers work behind the scenes,” he said.

After figuring out how to use the Grafana API to render graphs to the screen’s display-driver, the final step was using a soldering kit to wire the components together. Watching YouTube videos walked him through how to build his physical dashboard machine.

Ultimately, he got his mini-arcade display up and running to keep that extra eye on the Grafana dashboards.The entire process of his first-ever electronics hacking project “took a few weeks but it was very rewarding,” Mevorach said. And it won’t be his last, either. “I think it would be really cool to have something battery-operated or solar-powered and still be able to see graphs.” 

Watch the full session to see the Wix developer’s step-by-step hacking project to display Grafana dashboards. All our GrafanaCONline 2022 sessions are now available on-demand.