I started writing a City Building game a while ago. Whilst trying to think of ways to make it different to the hundreds of other City Building games out there, I had a shower thought; Wouldn't it be cool to create a virtual world, and have real life objects navigate it.
Thanks to Arduino, prototyping such a thing wasn't impossible for a solo developer like me, so I got to it. I built an RC car with a kit I found on the net and used an Arduino Mega and a Motor Control Shield (L298P - I made a video tutorial about using it, which you can find here). I hooked it up to an ESP 8266 so that I could connect it to the WiFi. The ESP 8266 connects to the WiFi network and passes commands it receives via MQTT down to the Arduino via serial communications. All the source code is available on git, you can find it in the description of the YouTube video.
The MQTT commands that the ESP 8266 receives are published via my PC which is, running the game. I used a test application I wrote a while ago which teaches a car to drive around a track using machine learning. If you're interested in that you can find the video I made about it here.
Comments