The Message Monkey visualizer sends a sequence of messages (monkey missives) to a connected device. It can be used to cycle a device through a sequence of commands to make sure it is performing consistently and reliably, or to send many lines of configuration information to your device. A selectable delay after sending each line gives your device time for processing. Monkey missives can be saved in the project file and quickly recalled. Break-points, triggers and extra delays can be used for more advanced scenarios.

Create a new message monkey visualizer

Create a new message monkey visualizer by selecting Message Monkey from the Visualizer menu or toolbox. The visualizer provides an editor for creating, managing and sending monkey missives. Create additional message monkey visualizers to work with several missives at the same time. Several message monkey visualizers could be sending at the same time, though the results may be un-predictable.

Message monkey visualzer
Send command sequences to your Arduino sketch with the Message monkey visualizer.

Visualizer Toolbar

Tool Description
Connect/disconnect button Connect/disconnect the selected connection. Use the drop-down to select the connection used by this visualizer.
Channel selector Select the channels processed by the visualizer.
Monkey missives Manage and select monkey missives stored in the project
Save missive Save the current monkey missive in the project. Hold down shift to save the missive with a new name.
Send next line Send the current line to the connected device and advance to the next line.
Move to beginning Move the play-head to the first line in the monkey missive.
Set next line Move the play-head to the line containing the edit cursor.
Set line rate Select the interval to wait between sending lines and enable/disable looping after the last line is sent.
Toggle a stop on the current line Add/remove a stop for the current line. Sending stops when the play-head hits a stop.
Toggle skip line Add/remove a skip-line for the current line. Skip-lines can be used for comments/annotations; they are not sent.
Insert delay Insert an extra delay command at the edit point.
Insert/manage triggers Trigger menu. Insert trigger commands and view the trigger pannel.
Help Open online documentation for the visualizer.

Monkey Missives

Enter the messages/commands the message monkey should send, select the line-rate (Select line rate) then click Run (Run missive button) to start sending lines. A message is text for the monkey to send. Commands, which are enclosed in braces ({, }), are used for triggers or additional delays.

MegunoLink will start sending each line in turn until it reaches the last line. If Loop is checked (in the line-rate menu), MegunoLink will continue sending from the first line when it reaches the last line.

Line and chunk indicators
A blue arrow indicates the line being sent; the red rectangle shows MegunoLink has paused for the additional delay.

The blue margin-arrow (Next line to send) indicates which line will be sent next. Click in the margin to move it to a new line. A red rectangle in the content area indicates the content that was last sent, the extra delay or trigger that MegunoLink is processing (see below).

Click the Send next line (Send next line) button to send the line marked by the blue margin-arrow and move the play-head to the next line.

Stopping at and skipping lines

The message monkey will stop sending if it hits a stop-line (break-point) and not send messages on skip-lines (comments).

Stop-lines can be used to halt a sequence for troubleshooting or to perform a manual task with the device. Continue sending lines using the Run button (Start sending lines). Stop lines are indicated by a red dot in the margin and are toggled using Toggle stop-line (Toggle stop-line) from the toolbar or context menu.

Skip and stop indicators
Skip lines (e.g., line 1) are not sent. Sending stops at stop lines (e.g., line 4).

Skip-lines can be used to include annotations and comments in the missive or to temporarily disable lines for troubleshooting. Skip-lines are indicated with a light grey background in the editor and are toggled using Toggle skip-line (Toggle skip-line) from the toolbar or context menu.

Extra delay

The delay command is used to include an additional pause between sending messages. Delay commands can be inserted from the context menu, toolbar or simply typed into the editor. Like all commands, the delay command is enclosed in braces ({, }).

Delay commands take one parameter: the duration of the pause. This duration may be supplied in seconds (e.g., {delay 10}) or as a timespan (e.g., {delay 0:0:10}). Timespans are given as hours:minutes:seconds, with all parts required.

Triggers

Triggers are an advanced feature to help synchronize a message monkey with your Arduino program. By including trigger commands in a monkey missive you can pause sending until the Arduino program is ready. An Arduino sketch can signal that it is ready by using our Arduino library to send the set trigger command.

There are three trigger commands, which can be inserted into a monkey missive to control the flow of messages:

  • await-trigger: pause sending until a trigger is in the triggered state.
  • clear-trigger: sets a trigger to the untriggered state.
  • clear-all-triggers: sets all known triggers to the untriggered state.

The first two commands (await and clear) take one parameter: the name of the trigger to wait on or reset. Like all commands, they must be enclosed in braces ({, }). For example:

  • {await-trigger Ready}: waits until a trigger named Ready is triggered.
  • {clear-trigger Continue}: sets a trigger named Continue to the untriggered state.
  • {clear-all-triggers}: sets all triggers to the untriggered state.

Insert trigger commands by typing directly into the message monkey editor or selecting commands from the editor context menu or trigger toolbar dropdown menu (Trigger menu).

Manage triggers with the trigger panel. Select Show trigger panel from the trigger dropdown (Trigger menu) to view the panel.

The trigger panel shows the state of each known trigger and can be used to add, edit, remove and set the state of triggers. Trigger state is normally set using serial commands sent from your Arduino program. It can also be set by tapping the spacebar when a trigger is selected in the panel.

Trigger Panel
Use the trigger panel to add, edit and set trigger state.

By default, triggers must be set and cleared explicitly. Either through the user interface or by serial commands sent from your Arduino sketch. An await-trigger command on an auto-reset trigger pauses sending messages until the trigger is triggered then automatically clears the trigger before continuing. Enable auto-reset triggers by checking Reset on read in the Edit Trigger dialog.

Auto-reset triggers (Auto-reset trigger icon) are best suited to events (e.g., work completed). Normal triggers (Manual-reset trigger icon) are best suited to state (e.g., ready to process commands).

Edit trigger
Edit a trigger to set the name, read-reset behavior and trigger state.

Start typing and press Enter to search