Not closing IDE when receiving serial

I’m trying to send serial to an arduino uno through a python script, but in order to run the script I’ll need to close the ide for the port to connect. I want to check if the serial is sent correctly to the arduino, is there a way to see what is received?

Use a software serial pin to connect to the python computer and echo the data received back to the main arduino serial port.

No you don't need to quit the IDE. you just need to make sure the Serial monitor is not open.

opening the Serial line from Python will reboot your arduino. I've written a small tutorial on interfacing with Python. See Two ways communication between Python3 and Arduino

It sounded to me like they wanted to use the serial monitor to check if the arduino received data from python.

Thanks for the guide, it’s very informative

Yes that’s correct, can you elaborate on echoing the data?

the serial connection is busy between your Python code and the Arduino. You can't have two "programs" (python and arduino serial monitor) both connected at the same time to the Serial device.

if you want to print something out of the Arduino, it's actually sent to the Python program. You could use my sample code to listen to the Arduino and print that out from the Python code.

Ah I see, I’ll try threading it. Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.