Relative Content

Tag Archive for pythonarduinopyserial

How can I wait for a command over serial in python?

For a robotics project, I have to connect a Raspberry Pi together with two Arduino’s.
Each Arduino controls two stepper stepper motors.
The raspberry pi is sort of the “brain” for the project and thus needs to control the arudino’s actions, often multiple in a row. They communicate over the serial port, therefore in python I use the “pyserial” framework.
My problem is, that I can’t know when exactly an arduino has completed powering the stepper motor so I can run the next action. Often it is crucial for me to know when the Arduino is finished. What I need is the following: