Monitor not printing to console - Mac osX

I am on an Mac, running macOS 13.7.8 and Arduino App Lab 0.5.0

When run this example code (from the app lab docs)"

#include <Arduino_RouterBridge.h>

void setup() {
   // Initialize the Monitor
   Monitor.begin();
}

void loop() {
   // Transmit the string "Hello UNO Q" followed by a newline character
   Monitor.println("Hello UNO Q");
   delay(1000);
}

Python main file:

import time

from arduino.app_utils import App

print("Hello world!")

def loop():
   """This function is called repeatedly by the App framework."""

   You can replace this with any code you want your App to run repeatedly.

   time.sleep(10)

See: https://docs.arduino.cc/software/app-lab/tutorials/getting-started/#app-run

App.run(user_loop=loop)

I see nothing in the Console tab under Serial Monitor. I have tried this sketch in PC Hosted Mode and Network Mode.

When I use the same Q board but on a computer running Windows - it works as expected → I see the Serial Output in App Lab (in PC Hosted mode and Network Mode)

Is this just my machine?

Thanks for any thoughts.

Nothing at all, or gibberish?

Are you making sure the baud rates in the board and the IDE match?

1 Like

Nothing at all shows up in the Serial Monitor tab on Arduino App Lab.

As for as baud rate, with the Monitor.begin() function, I do not believe that baud rate is specified?

Your python you pasted here has errors, including indention.

Maybe it is not what you are actually running,
The default one that you create new app looks like:

import time

from arduino.app_utils import App

print("Hello world!")


def loop():
    """This function is called repeatedly by the App framework."""
    # You can replace this with any code you want your App to run repeatedly.
    time.sleep(10)


# See: https://docs.arduino.cc/software/app-lab/tutorials/getting-started/#app-run
App.run(user_loop=loop)

1 Like

Thanks for checking on this @KurtE, the indentation error in my post came from the copy and paste into the forum (corrected now).

Like I mentioned, the same app runs in my windows machine and the serial monitor in AppLab shows the output, on my mac, the serial monitor is empty.

I am posting this here to see if any other mac users are having a similar issue, or it is just my machine perhaps.

1 Like

I use a Mac and have no Serial Monitor issues.

1 Like

@sonofcy thanks! It must be something on my machine then…

What type of MAC? May depend on newer type or older ones with different chips

Edit: Should mention, I tried installing on my old early 2013 Mac book pro, that I had to
jerry rig a little bit ago to install more up to date version of OS, that would run app lab.

I upgraded it to 0.50.0 and it did output stuff into the Serial monitor.

Side note: I was running an earlier version of applab like 3 releases ago and it did
not offer to update it, at least for several minutes, so instead I downloaded it and replaced it...

1 Like

I’m testing this on a 2017 iMac. Maybe I’ll try on a newer mac as well -Thanks @KurtE !

Where is Bridge.begin()?

1 Like

I just added it, does not seem to make a difference on my mac.

Side note, this Q, when I connect it to a windows machine and run the same app - the Serial Monitor in AppLab shows output on the Serial Monitor like I would expect.

For what it is worth Monitor.begin() calls Bridge.begin()

1 Like

I have heard/read that Bridge.begin() calles Monitor.begin(). I think that we should include both lines in the sketch.

I think it will be best practices to always call Bridge.begin in sketches that directly use the Bridge object, rather than relying on a side effect of Monitor.begin to serve as an equivalent.

However, in sketches that only directly use the Monitor object, it doesn't make sense to call Bridge.begin. Doing so only makes the sketch code more confusing without any benefit.

So my opinion is that there is no reason to add a Bridge.begin call to the code in post #1. The lack of such a call is surely not the cause of the "nothing in console" problem @programming_electronics_academy encountered.

Conversely, I do think it makes sense in a case like this:

#include <Arduino_RouterBridge.h>

void setup() {
  Bridge.begin();
  Monitor.begin();
}

void loop() {
  Monitor.println("Hello, world!");
  Bridge.notify("foo");
  delay(1000);
}

Then there is no need to include the Arduino_RouterBridge.h if there is no communication between MCU and MPU.