Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
Currently PwmMotor implements a coasting stop: when you set the speed to zero or stop it sets both the forward and backward channels of the bridge to zero, allowing the motor to continue freely rotating. Other implementations seem to include an active braking approach, allowing you to set both forward and backward channels to 1.0, which causes the wheels to stop dead and also helps keep the vehicle from rolling away. Could we please have a brake function? I have implemented a variation of PwmMotor for my own use, which appears to work well. The only hitch I found was that I had to add forward and backward stop calls to the close function to stop random wheel movements during close down.
Currently PwmMotor implements a coasting stop: when you set the speed to zero or stop it sets both the forward and backward channels of the bridge to zero, allowing the motor to continue freely rotating. Other implementations seem to include an active braking approach, allowing you to set both forward and backward channels to 1.0, which causes the wheels to stop dead and also helps keep the vehicle from rolling away. Could we please have a brake function? I have implemented a variation of PwmMotor for my own use, which appears to work well. The only hitch I found was that I had to add forward and backward stop calls to the close function to stop random wheel movements during close down.