Skip to content

Periscope

Jose Jimenez edited this page Jul 8, 2021 · 78 revisions

This is the future of micromouse development.

The periscope feature allows the user to see exactly what is going on inside your micromouse. Enjoy.


Problem

The current issue with the development of the micromouse is in debugging the maze-solving algorithm in the 
hardware. Aside from being time-consuming, it is confusing to diagnose an issue from a conglomerate stream 
of repetitive output or LED status lights. 

Solution

Streamline a protocol between the simulator and the micromouse to effectively animate the stream of data 
in a virtual environment. Along with animating the data, the user can enter a command in a text box to 
send to the micromouse and then view the response in a terminal-style serial monitor.

Architecture

A periscope packet gets sent from your micromouse to the simulator.
The user first connects to a device port in the drop menu, i.e. Bluetooth serial port cu.HC-06-DevB. The
simulator receives a periscope packet sent from the micromouse. Finally, once the packet is parsed the
virtual mouse renders an updated environment. Note, that concurrently a serial monitor is printing, in
plain text, the data being received from the micromouse.

Periscope Protocol:

Protocol (text-based):
send("Periscope: (16x16)(15,0)(north)(up)");
Periscope Protocol (byte-based): (inactive)

Serial Monitor Architecture

This is how your micromouse data gets outputted to a terminal style serial monitor.
The simulator receives the micromouse data and then streams it to an output file i.e. "/tmp/periscope.log".
Note that as soon as the user successfully connects to their device port - on the drop menu, a terminal 
window is created to automatically run the "periscopeSerialMonitor.sh" script. This script waits for
a new line of data to be written at the end of the log file then outputs it to the terminal console.