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
Are you sure it's not asleep?
Some machines disable things like USB when it's in low power mode (which screen savers could be).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With