Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Homepage
Usage examples:
Instantiate p21 as PWM with normal facing prop: Thruster fwd_port(p21,1);
Instantiate p22 as PWM with reversed prop: Thruster fwd_star(p22,-1);
Set pwm pulsewidth to forward 400us (1.9ms): set_speed(400)
Set pwm pulsewidth to reverse 400us (1.1ms): set_speed(-400)
Set an Emergency condition which locks out the set_speed(): setEvent()
Clear the Emergency condition: clearEvent()
Set max absolute value of pulsewidth to 150us (1.35-1.65 ms): set_max(150)
Get current max absolute value of pulsewidth, relative to 1.5ms: get_max()
Get the current pulsewidth in us, relative to 1.5ms: get_speed()
Get the current pulsewidth in absolute ms: get_pw()