My First Viking Longship
Communications: Protocol
Home
The Game

Water Craft

Helm

Communications

     Protocol
     xBee
     Pairing
Gems of Wisdom
Media
The communications protocol covered the pairing of crafts with helms, navigation commands from the helm to the craft, game play commands, and debugging commands from the admiral.

After a helm reads an iButton, it broadcasts the read serial number until a craft with a matching serial number responds. Once that occurs, the helm repeatedly tells the craft to do nothing until the game starts.

Once the game starts, the helm starts sending navigation commands to the craft. Navigation commands consist of two bytes. The first byte encodes speed and direction commands while the second stores water and special commands. If a craft is stood down, the admiral sends a stand down command to the craft. The craft must then forward this command to the helm. Once the helm receives the forwarded stand down command, it tells the craft to do nothing until the stand down time period has ended.

Other debugging commands were also implemented. At any time, the admiral may ping a craft or helm to determine its pairing status and what it’s paired with. If a craft ends up in a bad loop of code, the admiral may reset them remotely.

Full details of the protocol implemented may be found here.