I'm currently working with the Arduino Portenta X8 and trying to establish UART communication using the Arduino Cloud Editor. I'm uploading the following sketch to the M4 core:
#include <SerialRPC.h> // For Linux communication
#include <Arduino.h> // For USB debug
void setup() {
Serial.begin(115200); // USB debug (Arduino Serial Monitor)
SerialRPC.begin(115200); // Linux communication
while(!Serial); // Wait for USB connection
Serial.println("M4 Debug: Ready");
}
void loop() {
// Your M4 code here
Serial.println("Debug message to Arduino IDE");
delay(1000);
}
However, I’m not seeing any output in the Serial Monitor, even though I have selected the M4 core and set the correct baud rate (115200). I’ve also attached a screenshot showing the Serial Monitor view.
Could you please help me troubleshoot this issue? Is there anything specific I need to configure to get USB debug messages from the M4 core when using the Arduino Cloud Editor?
To check if the Arduino sketch is working correctly, you may want to read the messages from the Serial.println statements. You cannot currently read them directly in the serial monitor of the Arduino IDE.
(the statement applies equally to the Arduino Cloud Serial Monitor)
You must implement the communication through the board's USB CDC serial port to your PC in the Linux machine of the Portenta X8. An easy way to do that is running a Python script on the Linux machine.
You can send data from the Arduino sketch program running on the M4 core to the Linux machine via the RPC interface:
This Link also i tried, but unable to get the sensor data, and i was uploaded the arduino code from the link, unable to saw the serial.println logs.
can we discuss through google meet.
We prefer to discuss things here on Arduino Forum. That way the knowledge that is shared can benefit the entire Arduino community for years to come. When you use Google Meet, the knowledge shared is only available to the participants, and even they are likely to quickly forget it.
@sridhar_p0266 in the future, don't allow your topics to converge into parallel discussions as happened here. The reason is that generating multiple forum topics on the same subject matter can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.