How To Setup A Micro:Bit To Receive Serial Data From Unity

This is a simple program I wrote to allow the user to click a button in Unity and send a message via Serial to the Micro:Bit. Attached is a Unity Package file to run the scene shown in the via. This is the core component of my Bot Wars program that I am working on a larger package that includes the Multiplayer features added from Playerio.com This package uses the package from the Ardity Github to set up the serial connection. At the moment each command needs to be sent 3 times in order to be received consistently by the Micro:Bit so there is a built-in coroutine loop in the code. Here is the link to the Micro:Bit Code used in this video
https://makecode.microbit.org/_18yb0iMkda1k
And the Unity Package File
https://drive.google.com/file/d/1bAnCSiFMyROgufB1Cx8ZfTv5lJgxgpV4/view?usp=sharing

Hope you enjoy!

Leave a Reply

Your email address will not be published.