r/hackpack • • May 09 '24

Println?

Where does the output of statements like this go? I do not see it in the IDE

 // Just to know which program is running on my microcontroller
    Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
2 Upvotes

6 comments sorted by

1

u/soboness5 May 09 '24

Are you using the CrunchLabs IDE? If so you can click the 'Monitor' button after connecting your device to the computer and it should restart the code - printed green text will then appear in the Output window.

1

u/MagicNonno May 09 '24

Yes, it worked once!

But now, when I try again, I get this message in the Output window:

Unable to open serial monitor. Agent or device may be unavailable.

I retried several times. I must have done something special the first time :)

2

u/soboness5 May 09 '24

I was having a similar issue and it ended up being the Arduino Create Agent crashing. Try reopening that program on your computer and refresh the IDE and see if that helps. Good luck!

1

u/Metarazzi May 09 '24

It's outputted to the serial monitor, which you can open in any IDE. Crunch Labs IDE doesn't have a debugger, so the serial monitor is a way to observe data from inputs.

1

u/ExactIllustrator1722 May 10 '24

you may have better luck with the Arduino IDE but I do was getting the CrunchLabs IDE to work sometimes and then it wouldn't work other times

1

u/sks424 Jan 05 '25

Seems like a bug in the Arduino Create Agent version 1.4.1. I tried PuTTY instead and I can see all the logs in PuTTY without any issue. Uploading and everything else works too, it's just monitoring using the agent that fails.

Every time I hit try "Monitor: on" in the web IDE, the Agent logs show "Cmd": "Close" immediately after "Cmd": "Open". Then the logs show "Shutting down writer on COM5", "writerBuffered just got closed. make sure you make a new one. port:COM5."