Shop OBEX P1 Docs P2 Docs Learn Events
Does anyone port MPU6050_DMP6.ino to Propeller ? — Parallax Forums

Does anyone port MPU6050_DMP6.ino to Propeller ?

Kaeru no OjisanKaeru no Ojisan Posts: 26
edited 2014-07-02 17:51 in Accessories
Hi!

Does anyone port Arduino MPU6050_DMP6.ino to Propeller C or Spin ?

As far as I know this code is ported to mbed and Raspberry Pi, but I cannot find the ported one to Propeller C or Spin.

If I am correct that Arduino MPU6050_DMP6.ino has not yet ported, does anyone also know the reason why ?

Thanks,

Kaeru no Ojisan.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-07-01 19:24
    Hi!

    Does anyone port Arduino MPU6050_DMP6.ino to Propeller C or Spin ?

    I've been interested in the MPU6050 sensor for a while and I've tried to keep track of work on drivers for this sensor. I believe there's an object in the OBEX to read from the sensor but I don't think it uses the DMP6 feature.
    As far as I know this code is ported to mbed and Raspberry Pi, but I cannot find the ported one to Propeller C or Spin.

    Weren't these ports done by the same person who wrote the Arduino code?

    If I am correct that Arduino MPU6050_DMP6.ino has not yet ported, does anyone also know the reason why ?

    My guess is because it's time consuming to do so.

    I know there's a program to convert C to Spin. I don't know how well it would work on the DMP6 code. I've been meaning to try it.

    I've ported a few Arduino projects to Spin. Here's a link to my Spin code to interface with the inexpensive Mifare MFRC522 RFID readers.

    IMO, it can be a challenge to translate C to Spin. C's pointers don't have a direct counterpart with Spin. All of Spin's local variables are longs which has tripped me up a couple of times when converting C code to Spin.

    I'd think porting the code to Propeller C would be easier than porting it to Spin.

    I personally decided not to spend my time on porting the code to Spin since the little Arduino Pro Mini clones are so inexpensive. I just use the small Arduino as a slave processor and have the Propeller monitor the serial stream coming from the Arduino (an idea I got from a fellow forum member).
  • Kaeru no OjisanKaeru no Ojisan Posts: 26
    edited 2014-07-01 20:02
    Duane,

    Thank you for your quick response.

    The ports to mbed and Raspberry Pi were done by the different person other than jrowberg.

    I am very much interested in the idea that the Propeller monitors the serial stream coming from the Arduino, since I also know the MPU6050_DMP6.ino works on the inexpensive Da Vinci 32U board.
    Kindly advise me more about the idea. Can the data from Arduino be renewed every 10ms ?

    Thanks,

    Kaeru no Ojisan
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-07-01 20:34
    I purchased a couple of these 3.3V boards. I chose the 3.3V boards so I didn't have to worry about logic level translators between the Arduino and MPU6050.

    The Arduino didn't seem to have trouble with 115200bps even at 8MHz. I imagine it's reading the sensor at a slower frequency than it would with a 16MHz Arduino but I think the bottleneck is the data flow at115200 baud and the Spin code used to manipulate it.

    I don't know if the data can be renewed at 10ms or not. I imagine it depends on what sort of data you have it send. I've just played with the default data myself.

    I've purchased MPU6050 sensors a couple of times off ebay. The last time I purchased some was from this seller. The one (of two) I've tried appears to work fine.
  • Kaeru no OjisanKaeru no Ojisan Posts: 26
    edited 2014-07-01 21:39
    Duane,

    The 3.3V board looks much better.

    I also want to know how to connect Arduino and Propeller, and example Spin code.

    Thanks,

    Kaeru no Ojisan
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-07-02 10:04
    I also want to know how to connect Arduino and Propeller, and example Spin code.

    Connecting the Arduino to the Propeller is trivial. The "TXO" on the Arduino connects with any I/O pin on the Prop you choose to receive the serial stream on. A wire should be fine but if you want to be really safe you could use a 100ohm resistor in series. The "RXI" on the Arduino connects with any Propeller I/O assigned as the transmit pin.

    I don't have any example Spin code yet. My intention is to replace (or augment) the HMC58853L in this project with a MPU6050. I doubt I'll have time to do this until next week.

    I'm pretty sure I'll attempt to translate the DMP6 code to Spin but I don't know how soon that will be.
  • Kaeru no OjisanKaeru no Ojisan Posts: 26
    edited 2014-07-02 17:51
    Duane,

    I am very glad to hear that.
    I will expect you both of your attempts, and watch your progress.

    Kaeru no Ojisan
Sign In or Register to comment.