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!}

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

4 comments on “Monitoring Data
  1. 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

  2. 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