Navio2 Python example- PWM in reverse?

I am new to Navio2. I just got my rover working. The python PWM example code allows me to rotate the dc motors, but only in one direction. How can I make them rotate the other direction?

That depends on what motor controller you are using. If you have a brushed esc, the motor should stop at 1500us. With a lower signal it should start to turn in one direction and with a higher signal in the other direction.
If you use a H-bridge it is a little more complicated and not possible with Navio alone.

I am using an L293D H-bridge.


According to the L293D, the way to change direction is to switch which pin goes high first. Are you saying that it is not possible to make that change on the Navio alone?

Navio targets RC equipment, so its outputs only use PWM. For the H-bridge you need two additional digital pins, to set forward, backwards, stop and float. There are unused GPio pins on the uart connector, you could use with your own code, but you will not be able to use Ardupilot with a H-bridge.