Sending PWM output?

Hi. I was wondering if anyone knows how I can get motor PWM output values from Pixhawk and send it to a mavlink router in real time eg pi or Arduino

There is a mavlink message with the RC_OUTPUT values. But you should not stream that at high rates.

1 Like

That would cause some problems. What would be the best way to simulate the motors on another rover?

You have not explained in detail what you are trying to achieve. We can not help you unless you explain it.

I want to make a rover follow another rover by copying its motor and servo outputs.

Use “follow me” mode instead, it has been designed for it.

1 Like

Wheel slippage will make the second rover not follow the first.

You can not use the control output of a closed loop dynamic system to control a second, different dynamic system in an open loop fashion.

1 Like

It doesn’t need to work. I just need to be able to stream the pwm outputs to another device in real time. The best option would be to send it to an Arduino. But if is streaming the rc_output at high rates can cause problems, then I don’t know how else to do it. It was supposed to be a fun experiment :slight_smile:

Try it out. 20 to 30Hz should be fine, use MAV_CMD_SET_MESSAGE_INTERVAL on SERVO_OUTPUT_RAW

1 Like

Thanks. I will try it out and let you know how it went :slight_smile: