Member-only story

Building a Robot Friend Using HTML, CSS, and JavaScript

How a simple McDonald’s toy can become an easy web development project with children

Alvaro Montoro
Better Programming
12 min readDec 4, 2021
Image by author

Note: you don’t need the McDonald’s toy to build this game and play with it, but having the toy will add an extra fun factor to the project :)

The Toy

The other day, my wife got Happy Meals at McDonald’s for our kids, and I hate to admit it, but it was me, the one who enjoyed the toy the most.

It was a simple toy. A silly one: a robot looking thing with a smiley face (I don’t even know what movie/game the promotion was about), a rotating handle on one side, and a hole at the bottom:

Photos of the McDonald’s toy from the front and the bottom. A light colored looking robot with a spin on the side
At first, I thought it was a glow-in-the-dark toy… it wasn’t.

There was more to the toy: it became “interactive” with the McDonald’s app. So, I downloaded the app and tested it. The functionality was simple:

  1. Place the toy on top of the phone (in a specific position)
  2. Dim the room lights
  3. Select among the options that popped up
  4. And the robot “came to life” so you could interact with it.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Alvaro Montoro
Alvaro Montoro

Written by Alvaro Montoro

Full-Stack Software Engineer, Mobile Developer, Web technologies enthusiast. CSS aficionado. Twitter: @alvaro_montoro

No responses yet

Write a response