Thursday, 15 May 2014

Connect PX4Flow to Pixhawk then to PC





Pixhawk Setup

  1. Update the firmware on PX4Flow using QGroundControl (in the top left menu, click on CONFIG, then on Firmware Upgrade)
  2. Connect PX4Flow UART3 to any available serial on the Pixhawk, recommended is TELEM2
  3. Put a file /etc/extras.txt onto the microSD card, with this content:
    mavlink start -d /dev/ttyS2 -b 115200 -m custom
    mavlink stream -d /dev/ttyS1 -s OPTICAL_FLOW -r 2
  4. TELEM2 is the default port, but any other serial port can be used too. Found here.

Data Output

The PX4FLOW module outputs MAVLink packets on USB and serial port. Use QGroundControl to read data from the module. An I2C interface for sensor data reading is offered as well.
7 Bit I2C Address of the Flow Module: Default 0x42 (user selectable bits 0,1,2)


Open the Terminal Connection

Now plug in the USB cable of your adapter.
Use this shell command to start the connection (Mac OStype 'terminal' in Finder to start the shell).
screen /dev/ttyUSB0 115200 8N1
  • screen: The screen program
  • /dev/ttyUSB0: The name of the USB to serial adapter (Mac OStype 'ls /dev/tty.*' to see the serial ports, FTDI adapters show up as something like /dev/tty.usbserial-A7005rOd)
  • 115200: The connection is 115200 baud
  • 8N1: 8 data bits, no flow control, 1 stop bit