Skip to content
forked from rm-hull/hmc5883l

MicroPython wrapper class for HMC5883L I2C magnetometer

Notifications You must be signed in to change notification settings

CRImier/hmc5883l

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HMC8553L Magnetometer (I2C digital compass) for MicroPython

MicroPython driver class for HMC5883L magnetometer, using @rm-hull 's Python code and ported to use pyb.I2C

Usage example:

>>>import hmc5883l
>>>compass = hmc5883l.HMC5883L(port = 2, gauss = "4.7", declination = (-2, 5))
>>>compass.heading()
34.45
  • Uses continuous measurement mode. Single measurement mode can be easily implemented, though.
  • You might want to tinker with 'gauss' value in constructor if you see that the output values do not correspond to the way sensor is moved.
  • Beware of magnets - this driver does not do calibration =(

References

About

MicroPython wrapper class for HMC5883L I2C magnetometer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%