Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 723 Bytes

READMD.md

File metadata and controls

27 lines (16 loc) · 723 Bytes

MMC5603 3-axis Magnetic Sensor

The MMC5603NJ is a monolithic complete 3-axis AMR magnetic sensor with on-chip signal processing and integrated digital bus (I 2 C fast mode and I3C interface), the device can be connected directly to a microprocessor, eliminating the need for A/D converters or timing resources.

Example

from machine import I2C, Pin
from time import sleep_ms

from MMC5603 import MMC5603

i2c = I2C(0, sda=Pin(4), scl=Pin(16))

m = MMC5603(i2c)

while 1:
    sleep_ms(500)
    print(m.x(), m.y(), m.z())