The Coke Voting Device

1 minute read


Expanding on the amazing capabilities of ESP32, we built the Coke Voting Machine. It was a data collection experiment we ran in our coworking hub.

We fed on a few polls that already flowing in our community chat group and created an offline voting mechanism, basically leveraging the Touch input pins, for a minimalistic interactions mechanism.


We would leverage the touch input pins of the ESP32 as an input. All these interactions would be stored as individual events in our persistent storage. Based on the position and usage of these touch input pins, the event data can be used to create results and reports. Coke Voting Machine Schematic

Build your own

  • On-ground system

    The module has the following functions:

    • Connect to the internet on startup (if possible)
    • Listen for touch input interactions
    • Send interaction data to the server

    Link to Github repository

  • On cloud - listener This service will simply log the interactions detected by our on-ground module. I used firebase as it provides an easy mechanism of also having persistent storage - using Firestore. We only have one function running which basically
    • opens up an HTTP-endpoint,
    • when hit, logs interaction event details to firestore

    Link to Github repository

  • Simple HTML for display A single HTML file, that fetches data from your storage/API (in our case Firestore), to display collected events

    Link to Github repository

  • Assets I also created a few assets, which can be printed to accompany the device. These are available here.


Results of our little experiment are available at live result page

Further reading

You can see the device in action in the following Tweet from @Rahul Agarwal