Monitoring Data

Monitor

MonitorThe monitor shows all received data on a particular connection, either Serial or UDP.

Usage

Open a Monitor visualiser, select the connection that you have set up in the Connection Manager, any data being sent to your computer on that connection will be listed in order of arrival.

Extra Tips

  • There are a number of escape codes you can use including \n (newline), \r (carriage return), \t (tab), \\ (slash) and \xnn (send hex value, n=digit)

Message Monitor

MessageMonitorThe Message Monitor allows you to separate messages from all the other data that is coming across the connection to the micro. These messages can also be tagged to further group and filter from other messages.

Usage

Send a serial string in either of these formats to your computer:

channelName = "Secret"
{MESSAGE|data|Hello World!}
{MESSAGE:channelName|data|Boo!}
{MESSAGE:channelName|clear}

An example Arduino code function is shown for sending Messages to MegunoLink Pro (pass an empty string (“”) for channelName for no channel):

6 comments on “Monitoring Data
  1. Jason says:

    I am trying to use Megunolink to interface with a laboratory scale. I can receive data from the scale but the data only comes in the scales output format (example= 0.0123 g ). Is there a way to change the format of this message (example= {0.0123} g) by exporting it from the monitor or something so that it could be read by the time plot?

    • Phil Rowe says:

      Hi Jason, unfortunately there is no way to do this from the MegunoLink end. If you can adjust the protocol for the scale end you could match it to what MegunoLink needs. Alternatively you could also add an arduino in the middle which takes the message from the scale and reformats it for MegunoLink.

      Cheers
      Phil

  2. Levi says:

    Hi, I’m wondering is there any command can be used in Arduino IDE to clear the monitor window of MegunoLink ?

    • Phil Rowe says:

      Hi Levi, unfortunately this is not currently possible but we will add it to the message monitor in a future version.

      Cheers
      Phil

  3. Richard says:

    I was wondering if there was a way to make the Message monitor not start a new line every time it goes into the MyCSVMessage.Begin();… my code goes in 4 times and collects data. When it prints out it looks like…

    12,
    13,
    14,
    15,

    when I want it to be 12,13,14,15.
    Thanks.

    • Phil Rowe says:

      Hi Richard, in the example it looks like this

      MyCSVMessage.Begin();
      Serial.print(millis());
      Serial.print(“,”);
      Serial.print(analogRead(A0));
      Serial.print(“,”);
      MyCSVMessage.End();

      Could you collect your data inside the MyCSVMessage.Begin() -> MyCSVMessage.End(). For example, this would do what you want by combining all of the sensor readings in to one CSV message.

      MyCSVMessage.Begin();
      Serial.print(millis());
      Serial.print(“,”);
      //you could do one reading here
      Serial.print(analogRead(A0));
      Serial.print(“,”);
      //another here
      Serial.print(analogRead(A1));
      Serial.print(“,”);
      //another here
      Serial.print(analogRead(A2));
      Serial.print(“,”);
      //another here
      Serial.print(analogRead(A3));
      Serial.print(“,”);
      MyCSVMessage.End();

      Will this work?
      Phil

Leave a Reply