PiicoDev MMC5603 Module

Just taken delivery of a MMC5603 module.

Running on a Pi5

Previoulsy I have installed piicodev into my virtual environment and am currently successfully running PiicoDev ultrasonic modules.

I’ve followed the the suggested code for the magnetometer which includes the import “from PiicoDev_MMC5603 import PiicoDev_MMC5603” but I get the error “No module PiicoDev_MMC5603”.

I tried importing PiicoDev_QMC6310 and that imported ok but i got a raft of different issues - I think around addressing - not sure?

Note i2cdetect found the module at 0x30 which I understand is correct.

Anyhoo - any ideas? @Jaryd

3 Likes

Hi Brett,

It looks like the PyPi package needs updating - it should be updated first thing tomorrow morning :smiley:

1 Like

Thanks Liam!

1 Like

All good! Works now.

Thanks.

Brett

1 Like

Here’s one for you.

The function PiicoDev_MMC5603.read() actually returns the strings “x” , “y” and “z” and not the actual magnetic field strength floats. (_MMC5603.readHeading() works fine).

Cheers,

Brett

1 Like

Hi Brett, could you please post a screenshot of the output if you print the function directly.

It should output a dictionary of values.

1 Like

Here’s one for you.

The function PiicoDev_MMC5603.read() actually returns the strings “x” , “y” and “z” and not the actual magnetic field strength floats. (_MMC5603.readHeading() works fine).

Cheers,

Brett

1 Like

Ok - ignore my post. I worked out it returns type dictionary.

Silly me! :squinting_face_with_tongue:

1 Like

Hi Liam,
Sorry, I posted too early.
I subsequently had a look at the function code on Github and saw that it returned a dictionary.
I am a victim of using a bit of ChatGPT generated code. The more I use ChatGPT the more I realise it’s good but prone to errors.
Cheers
Brett

| Liam120347
6 December |

  • | - |

Hi Brett, could you please post a screenshot of the output if you print the function directly.

It should output a dictionary of values.

1 Like