I just wondered how the motor will react to this action. So if I tell the motor (using the analogs) to spin 100 fwd and 25 reverse at the same time , will it lower its speed to 75 fwd (100 fwd - 25 reverse) or just continue spinning with 25 reverse ?
How do you plan to do both at the same time? If you just tell the motor to do two different things, it will do whatever you told it to do last. I apologize if I am not answering your question…
This is where it’s helpful to understand what’s going on under the hood. When you issue a command, it’s being transmitted over the wires going to the motor to another microcontroller in the motor. That motor microcontroller can only do one thing at a time.
If you tell it to go froward and then backward, that’s two separate commands. Generally whichever you tell it to do first will technically start to happen, but the second command is just going to replace it, so you’ll effectively never see the first command happen.
The commands intentionally do not allow you to issue simultaneous commands.
I agree with everyone, and based on actual experience, telling the same motor to do two different things does not work for the mechanism it’s controlling, it doesn’t spin consistently, and the motors also overheat quicker.
To expand on this slightly, and because I’ve seen this mistake in code before…
If you issue forward and back commands and have it in a loop (which is common in coding), the motor will usually stop and you might hear some ‘ticking’ sounds as it tries to spin forward, then back, at a very rapid rate.