Gaming The Dino With ESP8266

Prabindh Sundareson
3 min readApr 19, 2020

--

What can you do with a Wio-link bare board ?

Control chrome:\\dino with it!!

HW Requirements

Wio-link board

WiFi connected PC/Laptop + Router

Battery-bank

USB-Cable

Software tools

Anaconda (Py3.4+, ampy, esptools), Visual Studio, PuTTY, httplib header, Any text editor, Chrome browser on PC

Introduction

The chrome browser ships with a simple jumper game that can be controlled with a single key (space bar). But, it needs to be played on the laptop.

The Wio-link bare board has a single button on it.

→ A great pairing to create a game, to be played free of the laptop or internet !

Note — The steps below will destroy the shipped firmware on wiolink board.

Design

The system consists of 3 parts:

  • The Wio-link acting as a WiFi-remote
  • The Server running on the Laptop, connected with wio on local network
  • The Chrome Browser on the Laptop, running chrome:\\dino

System Diagram

System Diagram (Board and PC are wifi connected)
Wio-link Config Button (Controller)

Software

Programming the Wio-link (as Controller)

Without the connector, the board has just 2 buttons — RESET, and CONFIG. Left with no choice than to choose the CONFIG button.

For the USB serial port to come up install the serial driver, referred in the notes in references below.

Finding the GPIO config for the CONFIG button took a while. It took just some more extra time to figure out it was pulled high, looking at the Schematic PDF on the Wiolink site.

The rest was easy to figure out.

Micropython code (for Wiolink as Station)

Programming the PC (as Server)

Python sample code

C++ server code (alternative to Python)

https://gist.github.com/prabindh/9dee285a38c4b708811f1fce7a36eca5

Operation

  1. Start the server application on the PC. Ensure to update the IP addresses for your case.
  2. The game can be manually launched by typing in Chrome browser address bar.

chrome:\\dino

  1. Update the IP addresses, and program the ESP board.
  2. Connect the Wio-link to battery-bank. It automatically connects to the network
  3. Click the CONFIG button on the Wio-link. It triggers the SPACE key on the PC and the game starts.
  4. Have fun.

Other compatible games

Scratch game clones like the below can be used as well,

https://scratch.mit.edu/projects/189057541

The WebGL game can be played on the PC as well!!

https://www.gpupowered.org/brainstem/game.html

Live

Here is a quick video of how it works

Notes

1. Operating via WiFi has significant latency, though it is played on local network. A direct p2p connection (wio as AP) could work better

But great for spending time. For ex, project to a TV, and have large-screen game time from the couch without needing the laptop.

2. The operations mentioned in this article, destroy the shipped firmware, beware.

Updates at,

References

  1. Random notes

2. Wiolink site

3. Ordering in India

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response