Using UART outputs from expansion board M0141 to control Voxl2-IO (M0065) to output PWM signal is non-standard.
This project simply lets you control PWM on voxl2-IO from any UART port on the Voxl2.
Step 1: Wire everything correctly.
Step 2: (on the Voxl):
make
./voxl-pwmCurrently, the UART device /dev/ttyHS1 (APPS_HS1_UART) is used, which is the one
exposed on the M0141 expansion board.
The duty cycle is controlled with the input to voxl2_io_create_pwm_packet4, currently set to PWM_OUTPUT = 400.
The range of valid values is
The code is hard-coded to use UART channel 1. It is obvious from the code how to control channels 1-4, but I don't know about 5-8 ... I didn't get the hires pwm packet to work.
Our M0065 board reports FW version 1, but the PX4 driver requires it to be 2, which is interesting. Doesn't seem matter for our use case tho.