Marvin let me drive easily

In this second version of the software, I managed to be able to slide my thumb to the OSC controls. I explain. When you move an OSC slider, a bunch of commands are sent. Not just the start position and the end position, but many position behind these last two. On the Marvin robot, the commands are received and computed by the Raspberry Pi then send to the Arduino board through the serial port. The problem is at this point. The serial command are very slow, and there are queued. So when I moved my thumbs to accelerate it take a while to the robot to get to the speed. Worse, when I hit the panic break button, it has the queue all the commands sent before.

So I manage to put all the commands in a list. Them only send the last one when the serial port is ready. Look a bit easy, but I had to learn a bit more of Python and understand how to create threads. The fun thing? I had fun doing it : )

Leave a Reply

Your email address will not be published. Required fields are marked *