My arduino is programmed to receive commands via /dev/ttyACM0 from my PI.
However, everytime I upload a change in the program to the arduino, I need to connect using "picocom --omap crlf /dev/ttyACM0", and then manually send a command.
After that, I exit picocom, and run the python script; then the Arduino replies normally. if I dont do that, my python code will just timeout.
Here is a portion of the python code to connect.
...... # coneccion serial dispositivo = "/dev/ttyACM0" ser = serial.Serial(dispositivo, 9600, timeout=10) try: ser.flushInput() ser.write("2\n") # request data from arduino.... time.sleep(0.03) linea = ser.readline() .......
Any ideas what could be wrong?