I want to get telemetry data from my flight controller (Matek F405-CTR) and send control commands to it via MSP protocol.
I've already configured UART3 port on Matek in Inav configurator (look at pic).
Then I connected usb-serial converter (CP2102) to Matek on UART3 port for testing. So that, Matek controller is defined as COM3 on my PC and CP2102 as COM4
But when I'am trying to run simple test from pyMultiWii lib I get nothing from Matek controller neither from CP2102. I've tried this test for COM3 and COM4 ports as well.
#!/usr/bin/env python
"""show-attitude.py: Script to ask the MultiWii Board attitude and print it."""
from pymultiwii import MultiWii
from sys import stdout
if __name__ == "__main__":
board = MultiWii("COM4")
#board = MultiWii("COM3")
try:
while True:
board.getData(MultiWii.ATTITUDE)
#print board.attitude #uncomment for regular printing
# Fancy printing (might not work on windows...)
message = "angx = {:+.2f} \t angy = {:+.2f} \t heading = {:+.2f} \t elapsed = {:+.4f} \t".format(float(board.attitude['angx']),float(board.attitude['angy']),float(board.attitude['heading']),float(board.attitude['elapsed']))
stdout.write("\r%s" % message )
stdout.flush()
# End of fancy printing
except Exception as error:
print("Error on Main: "+str(error))
May be I'am doing something wrong? I've already read this post, but it dosn't help me. Any advice will be appreciated!