bhunt2 / QC1.0

Design, documentation, and code for our first quadcopter
1 stars 0 forks source link

Serial Port on Flip MWC 1.5 #27

Closed sabmah closed 8 years ago

sabmah commented 8 years ago

@bhunt2 @spesialstyrker @hautruong36 @Kekahuna I have been having problems on communicating with Flip MWC 1.5 as I have stated in this issue https://github.com/bhunt2/QC1.0/issues/24 I researched the specs on FLIP MWC FLIGHT CONTROLLER 1.5 and found out that the there is only one serial port for Bluetooth. Does this mean this is only used for Bluetooth protocols? I am hooking my tx/rx pins from Edison to the Flip's serial port. Also, I looked through their firmware code, it looks like its listening to the USB port.

MWC schematic

sabmah commented 8 years ago

added issue #

sabmah commented 8 years ago

I found this global constant on https://github.com/sabmah/multiwii/blob/master/MultiWii_shared/config.h#L708 but it was on the GPS section of the code.

//Enables the MSP_WP command set , which is used by WinGUI for displaying an setting up navigation
 //#define USE_MSP_WP
bhunt2 commented 8 years ago

@sabmah @Kekahuna @hautruong36

This should not be in a new issue. It is just more discussion about the same issue. Please move this information to issue #24 and we will continue the discussion there. I will put my comments in regards to these concerns here, so please move them with it so everything stays in order. Once it is moved close this issue.

My comments to be copied:

Bluetooth UART: First of all, what bluetooth is the Flip trying to work with. There is no reference to BT in the firmware or documentation and nothing about it in the description of its capabilities. There is a reference saying that you can connect a BT device, but it is an optional device. The only device I see that is using serial by default is GPS. The GPS also can be configured to use I2C. Since at this point you will not be connecting it, you can find out in the firmware or in the multiwii software how to disable it. The additional data being transferred that we saw in a couple of your screen shots that didn't make sense may have been the Flip trying to communicate with the GPS. I am not sure because I haven't looked that thoroughly through the code.

Firmware is listening to USB port: ATmega328 only has one serial port available. This means that it will be used for both USB and other device communications. This may be the other possible reason why we see erroneous data in the output. I have not looked at everything so I don't know all the protocol and exactly how it is connected, but there may be some other setup needed to communicate properly. Remember you chose a different path than I had, so we are all learning together here.

Communication with the Flip: Remember, the Flip allows for SPI, I2C, and UART communication. Any one of these should have the libraries available for the Edison. They are pretty straight forward methods of communication, so it shouldn't be too much to get something going with any one of them.

For determining proper communications: Serial - You can use Putty setup to the appropriate port and speed to see what is being transmitted. I2C/SPI - There are two of the logic analyzers in the Willow Creek lab that have decoders that can tell you if the protocol is correct and tell you what the data is that is being sent in real-time.