Why this HMC5883L just output fixed number?

Where did you get the module? Post a link if relevant.

The HMC5883L was discontinued long ago, and many new modules have the inferior QMC5883 knockoff chip, but are mislabeled. A different Arduino library is required for that chip.

1 Like