Hello Guys,
I am working on a chip design that consists of a PIC micro-controller and several sensors (e.g. light, etc) and a GNSS (Ublox M8Q). I was able to communicate these sensors with the PIC via I2C bus (PIC acts as the master and all sensors act as slaves). I also communicated GPS information from the GNSS module to the Pixhawk2.1 (PX4, ProfiCNC) via UART on the 8-pin GPS1 port of PixHawk. Depending on the GPS information communicated to the Pixhawk, I believe that the Pixhawk sends some information back. Based on this information, I need to turn on LEDs on my PCB. I need a way to get these messages to my micro-controller.
Going through Pixhawk documentation, the GPS1 port has 1 UART and 1 I2C port. As mentioned above, the UART Pins are used by GNSS device to communicate GPS information to Pixhawk, and it does it fine (I have verified that the Pixhawk receives GPS information via Mission Planner). However, I have no clue of how to read the information sent back by PixHawk. I know that I should use the I2C on GPS1 port of Pixhawk (connected to my micro-controller), however, how do I implement this in software. How do I know what messages does the PixHawk sends and in what order? Does it act as a master or a slave? Can someone point me in the right direction?
Thank you in advance.
Replies