Skip to content

CMCRobotics/microsquad

Repository files navigation

MicroSquad

Build

MicroSquad is an Internet of Things orchestration framework focused initially on the BBC Micro:bit (a.k.a Microbit). To interface with the Microbit, it relies on Bitio : Using a single Microbit as a gateway, one can control remote Microbits over the radio. Messages are exchanged using the Influx line protocol (with a small custom parser implemented in micropython)

Microbit

Basic MicroSquad functionalities include :

  • Broadcast, group and unicast messaging.
  • Assigning session identifiers (will be resent with each message from the client).
  • Remotely controlling displays.
  • Requesting remote sensor readings (buttons, gyroscope, compass, temperature, votes etc...).
  • Controlling a 3D web-based scene where players can interact.

Software dependencies

For the MicroSquad Gateway :

For the MicroSquad clients :

  • The provided MicroSquad firmware to upload on each Microbit. For instance microsquad.hex

For the MicroSquad Web Interface :

How to use it

Flash the Microbits

Configure and start Mosquitto MQTT broker

Place the following file contents at location /etc/mosquitto/conf.d/listeners.conf :

listener 1883
protocol mqtt

listener 9001
protocol websockets 

allow_anonymous true

For a more comprehensive example, consult docs/samples/mosquitto.conf.

Start the Gateway

From modules/gateway, execute :

. ./setup-venv.sh
python -m microsquad.gateway.mqtt

Start the Web UI

From modules/web-ui, execute :

. source-path.sh
npm run serve