Skip to content

Taur-Tech/HMC5883L

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HMC5883L

Python library for Honeywell HMC5883L sensor

##Change Log

  • 11.08.2015 - initial commit

##About the sensor:

  • 3-axis magnetometer
  • FS range +/-8gauss
  • I2C Digital Interface

##Requirements:

  • python-smbus

##Usage:

###Parameter list and acceptable values:

  • 'sample_avg' [samples] number of samples the sensor will average during measurement
    • 1 (default)
    • 2
    • 4
    • 8
  • 'output_rate' [Hz] the rate at which new measurement data is made available
    • 0.75
    • 1.5
    • 3
    • 7.5
    • 15 (default)
    • 30
    • 75
  • 'bias_mode' defines whether or not to apply a bias to the measurement, applies to all 3 axis
    • 'normal' (default)
    • 'pos_bias'
    • 'neg_bias'
  • 'gain' [LSb/Gauss] gain applied to measurement values, applies to all 3 axis
    • 1370
    • 1090 (default)
    • 820
    • 660
    • 440
    • 390
    • 330
    • 230
  • 'resolution' [mG/LSb] another way to set the gain, applies to all 3 axis
    • 0.73
    • 0.92 (default)
    • 1.22
    • 1.52
    • 2.27
    • 2.56
    • 3.03
    • 4.35
  • 'i2c_speed' sets normal or high speed I2C
    • 'normal' (default)
    • 'high'
  • 'meas_mode' sets type of measurement operation
    • 'continuous'
    • 'single' (default)
    • 'idle'

###Method list

  • get_parameter(parameter) returns parameter value or None on error
  • set_parameter(parameter, value) sets value for specified parameter, return True on success, False on error
  • get_field_x() returns the field value for x axis in mG
  • get_field_y() returns the field value for y axis in mG
  • get_field_z() returns the field value for z axis in mG
  • get_field_xyz() returns the field values for all axis in mG

About

Python library for HMC5883L sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages