The micro controllers seemed like interesting hardware to work on. Hence, we decided quite quickly to work with these. After that we thought about a project and came up with the idea to combine it with the Morgan Stanley Challenge. We thought it would be interesting to implement a multiplayer game on the computer and use the micro controllers to play against each other. This ended in us producing a fully fledged library. This library is versatile and currently allows sending button presses and accelerometer information.
What it does
There are three micro controllers. One acts as kind of a server. The other two are the actual controllers. The ‘server’ is connected to the computer where the actual game runs on. The two other micro controllers talk to the ‘server’ and through that to the computer. We have implemented two retro games, namely Pong and a kind of multiplayer snake. Those are started at the computer and then each ‘player’ is controlled by one of the mini controllers.
How I built it
We started with focussing on the connection between the different micro controllers (via radio) and connection between the ‘server’-microcontroller and the laptop (via uart-serial). After that we built the pong game on the computer. For the game, we decided to use ‘pygame’ library since the rest of our project was already written in python. After we finished the implementation we integrated the controls via the micro controllers. For steering the pong ‘bat’ we used the accelerometer of the micro controllers. Since everything was working well together we decided to program another game which is a kind of multiplayer snake. This time we used the Buttons ‘A’ and ‘B’ to steer. In the end, we put everything together and did some fine tuning.
Challenges I ran into
The connection between the ‘server’-micro controller turned out to be quite challenging and took a lot of effort. Eventually, we got it to work even though we had to deal with the loss of some packages. This made the controls of the second game a bit laggy from time to time but overall we were satisfied with them.
Accomplishments that I'm proud of
We managed to do everything we planned to and with the second game even more. We finished in time and learned a lot.
What I learned
It differs from person to person but overall we developed our knowledge in python and also in working with hardware which was definitely a lot of fun.
What's next for Microbit controllers
The controllers can be used for other games as well. These two games are just an example of what they can do.