LibrePilot Forum

Development => Firmware General => Topic started by: aa8mc on February 12, 2016, 02:21:54 am

Title: I2C MAG on Revo Flexiport
Post by: aa8mc on February 12, 2016, 02:21:54 am
I am trying to set up an I2C Mag with a build from the next branch.  The mag is coupled with a UBLOX GPS.  The whole unit has 2 JST connectors.  The first is 4 wires for the GPS.  The second is 2 for the mag.  I'm assuming that VCC and Ground are the 2 missing wires from the mag because the board is already pulling power from the GPS.  As for the 2 remaining wires, I'm not sure which is RX and which is TX, but I'm assuming they should go the two middle wires of the Flexiport.  Can someone please confirm.  I really don't want to let the smoke out of my shiny new GPS.
Title: Re: I2C MAG on Revo Flexiport
Post by: aa8mc on February 12, 2016, 03:42:12 am
Just kidding, looking at the connectors again and I'm thinking that RX and TX are pins 3 and 4 on the Flexi.
Title: Re: I2C MAG on Revo Flexiport
Post by: aa8mc on February 12, 2016, 04:33:40 am
Found the answer with a little more google-fu.  Pin 3 is SCL and 4 is SDA.
Title: Re: I2C MAG on Revo Flexiport
Post by: TheOtherCliff on February 21, 2016, 11:43:51 pm
Be careful and a note to others reading this:  On a serial connection, you connect Rx on one to Tx on the other.  On I2C communications, you connect SCL to SCL and SDA to SDA.

I hope you got it working.  I fly it all the time.  :)
Title: Re: I2C MAG on Revo Flexiport
Post by: zukenj on February 29, 2016, 03:29:27 pm
 caseyjmorton,

did you use this GPS?

http://www.amazon.com/Hobby-Ace-Compass-Folding-Multirotor-Quadcopter/dp/B013UW2KKM (http://www.amazon.com/Hobby-Ace-Compass-Folding-Multirotor-Quadcopter/dp/B013UW2KKM)

Title: Re: I2C MAG on Revo Flexiport
Post by: hicky on March 17, 2016, 12:25:06 pm
I don't suppose anyone fancies sharing there pre-compiled build with me do they?

I'm all wired up and literally itching to have a play!

Obviously I accept any consequences.
Title: Re: I2C MAG on Revo Flexiport
Post by: aa8mc on March 18, 2016, 04:43:53 am
What OS?
Title: Re: I2C MAG on Revo Flexiport
Post by: kennyevo on March 21, 2016, 11:33:18 am
I'm trying to connect my cheap gps' mag to the revo too (ubloxneo-6m), but the I2C in the system health is orange :S

EDIT: My gps module doesn't have the mag chip on the pcb, damn (the cover says "with compass" -.- )
Title: Re: I2C MAG on Revo Flexiport
Post by: f5soh on March 21, 2016, 11:36:42 am
Do you apply +5V to board before connecting to USB port ?

Title: Re: I2C MAG on Revo Flexiport
Post by: foster9099 on March 28, 2016, 07:33:08 pm
I had started to add in the extra connector for the flexi port until i read about kennyevo not having a mag chip in the first place, what does the mag chip look like so i can check mine and id also like to have a pre compiled build if its possible to share it for mac os.
Title: Re: I2C MAG on Revo Flexiport
Post by: f5soh on March 28, 2016, 07:51:31 pm
Magnetometer chip is the same used on Revolution board:

(https://forum.librepilot.org/index.php?action=dlattach;topic=833.0;attach=2240)
Title: Re: I2C MAG on Revo Flexiport
Post by: hwh on March 28, 2016, 07:57:30 pm
@f5soh's picture shows the L883 version, there's also one marked A983.  They both look the same and work.
Title: Re: I2C MAG on Revo Flexiport
Post by: foster9099 on March 28, 2016, 08:06:07 pm
Thank you for the fast responses to that, I have a chip that looks the same but marked L883 2430 but I assume it doesn't make a difference. As for creating the build of Librepilot to allow the external mag is it just as simple as following all the steps laid out here  "https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging" for windows as I have never done anything as in depth as that before but I can follow instructions?