Skip to content

Getting extreme readings #1

@mikevanis

Description

@mikevanis

Hi @sparkfun,

I'm using this module with an ESP-12 and I'm just running the Basic example. I'm getting very unusual readings. Here is a typical sample:

X: 64895, Y: 425, Z: 64768

What could this be? Have I got a damaged MAG3110? Is there a weird scale value register set somewhere? Any clues would be much appreciated.

EDIT: Upon further investigation - the MAG3110 has two 8-bit registers for each axis. In this library, they're joined and packaged into an int. Shouldn't they be packed into a uint16_t or an unsigned int? Surely there's no sign in the values the magnetometer will spit out. Could I be getting these values due to an overflow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions