The Message Monitor Library provides a convenient set of methods for sending data to the MegunoLink Message Monitor visualizer.

To use the Message Monitor functions:

  1. Install the MegunoLink Pro Arduino library
  2. Add #include "MegunoLink.h" to the top of your Arduino program
  3. Create a Message variable
  4. Call methods on the Message variable

Message Monitor Library Example

This simple example sends the the millis() time and two ADC measurements to the Message Monitor visualizer. The comma-separated data starts with the Begin() and finished with the End() method. Between these two calls, standard Serial.print(…) methods add content to the message that will be sent. The numbers are all separated by commas and could be easily pasted into Excel.

Every 100 measurements it sends a separator using the Send(…) method. For single values with labels, you don’t need to use the Begin() and End() methods.

CSV Arduino Data

The example Arduino program sends comma separated values to the message monitor

Message Monitor Library Reference

The Message Monitor Library provides a simple way to send Message Monitor commands to MegunoLink’s Message Monitor. Is implemented using a class named Message. Use variables of type Message to send variable values, blocks of text or clear the message monitor.

Message methods are:

Detailed Descriptions

Message(MessageDestination — optional, ChannelName — optional, SerialPort — optional)

Constructs a variable that can be used to send commands to a Message Monitor visualizer. All the parameters are optional:

  1. MessageDestinationMessage::Text, Message::Speak, or Message::TextAndSpeak, which tells MegunoLink whether to add the message data to the text buffer or speak it using the text-to-speech engine, or both. Defaults to Message::Text.
  2. Channel: selects which message monitor visualizer the data gets sent to. Defaults to the default channel.
  3. SerialPort: selects which Arduino serial port MegunoLink is attached to. Defaults to Serial

Send(Value)

Sends a value to the Message Monitor.

Send(Label, Value)

Sends a value to the Message Monitor with a label.

Begin()

Starts a message block. This method sends the first part of the message command. Content sent to the serial stream before the End() method is called will be displayed in the Message Monitor.

End()

Completes a message block. Any content sent between the Begin() and End command will be send to the Message Monitor.

Clear()

Sends a command to clear the Message Monitor text buffer.

Recent Posts

Leave a Comment

Start typing and press Enter to search