Pat McC / thruster

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()


All wikipages