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.
Visualizer Toolbar
Tool | Description |
---|---|
Connect/disconnect the selected connection. Use the drop-down to select the connection used by this visualizer. | |
Select the channels processed by the visualizer. | |
Manage and select monkey missives stored in the project | |
Save the current monkey missive in the project. Hold down shift to save the missive with a new name. | |
Send the current line to the connected device and advance to the next line. | |
Move the play-head to the first line in the monkey missive. | |
Move the play-head to the line containing the edit cursor. | |
Select the interval to wait between sending lines and enable/disable looping after the last line is sent. | |
Add/remove a stop for the current line. Sending stops when the play-head hits a stop. | |
Add/remove a skip-line for the current line. Skip-lines can be used for comments/annotations; they are not sent. | |
Insert an extra delay command at the edit point. | |
Trigger menu. Insert trigger commands and view the trigger pannel. | |
Open online documentation for the visualizer. |
Monkey Missives
Enter the messages/commands the message monkey should send, select the line-rate () then click Run () 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.
The blue margin-arrow () 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 () 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 (). Stop lines are indicated by a red dot in the margin and are toggled using Toggle stop-line () from the toolbar or context menu.
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 () from the toolbar or context menu.
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 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 ().
Manage triggers with the trigger panel. Select Show trigger panel from the trigger dropdown (
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.
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 (