Download Print this page
Seeed Grove Manual

Seeed Grove Manual

3-axis digital compass v2
Hide thumbs Also See for Grove:

Advertisement

Quick Links

3/18/2019
Grove - 3-Axis Digitial Compass v2.0
The Grove - 3-Axis Digital Compass is a digital compass sensor based on Bosch
BMM150. It allows measurement of the magnatic eld in three perpendicular axes
and the output can be read out over I2C and SPI interface, perfectly suitable for 3-
Axis mobile applications.
http://wiki.seeedstudio.com/Grove-3-Axis_Digitial_Compass_v2.0/
Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki
    
1/15

Advertisement

loading
Need help?

Need help?

Do you have a question about the Grove and is the answer not in the manual?

Questions and answers

Summary of Contents for Seeed Grove

  • Page 1      Grove - 3-Axis Digitial Compass v2.0 The Grove - 3-Axis Digital Compass is a digital compass sensor based on Bosch BMM150. It allows measurement of the magnatic eld in three perpendicular axes and the output can be read out over I2C and SPI interface, perfectly suitable for 3- Axis mobile applications.
  • Page 2: Speci Cations

    3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki This is the second generation of Grove - 3-Axis Digital Compass, comparing to the rst version, this version can perfectly match the demanding requirements of all 3- Axis applications while the price is almost half of the rst version, very cost effective.
  • Page 3: Platforms Supported

    3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Item Valnue Working Voltage 3.3V / 5V Magnetic eld range typical ±1300μT(x, y-axis), ±2500μT(z-axis) Magnetic eld resolution 0.3μT Output Degree 0º ~ 360º Interface -40℃ to +85 ℃ Working Temperature...
  • Page 4: Getting Started

    3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Arduino Raspberry Pi BeagleBone LinkIt ONE  Caution The platforms mentioned above as supported is/are an indication of the module's software or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases.
  • Page 5 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Seeeduino V4.2 Base Shield Grove-3-Axis_D Get One Now Get One Now Get One Now [http://www.seeedstudio.com/Seeeduino- [https://www.seeedstudio.com/Base- [https://www.s V4.2-p-2517.html] Shield-V2-p-1378.html] 3-Axis-Digital-C 3034.html] Step 2. Connect Grove-3-Axis_Digitial_Compass_v2.0 to port I2C of Grove-Base Shield.
  • Page 6 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki  Note If we don't have Grove Base Shield, We also can directly connect this module to Seeeduino as below. Seeeduino_v4 Grove-3-Axis_Digitial_Compass_v2.0  Caution http://wiki.seeedstudio.com/Grove-3-Axis_Digitial_Compass_v2.0/ 6/15...
  • Page 7 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Please plug the USB cable gently, otherwise you may damage the interface.Please use the USB cable with 4 wires inside, the 2 wires cable can't transfer data. If you are not sure about the wire...
  • Page 8 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki void loop() bmm150_mag_data value; bmm.read_mag_data(); value.x = bmm.raw_mag_data.raw_datax; value.y = bmm.raw_mag_data.raw_datay; value.z = bmm.raw_mag_data.raw_dataz; float xyHeading = atan2(value.x, value.y); float zxHeading = atan2(value.z, value.x); float heading = xyHeading; if(heading < 0) heading += 2*PI;...
  • Page 9 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Step 6. Within these 3 seconds, please tilt and rotate the compass back and forth on every axis, as shown in the picture below. The calibration period time can be changed through the parameter timeout in the fuction calibrate(uint16_t timeout).
  • Page 10 90º means Y axis points at West, 180º means Y axis points at South, 270º means Y points at East. Enjoy your compass! Play With Raspberry Pi (With Grove Base Hat for Raspberry Pi) Hardware Step 1. Things used in this project: http://wiki.seeedstudio.com/Grove-3-Axis_Digitial_Compass_v2.0/...
  • Page 11 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Raspberry pi Grove Base Hat for RasPi Grove - 3-axis Get ONE Now Get ONE Now Get ONE Now [https://www.seeedstudio.com/Raspberry- [https://www.seeedstudio.com/Grove- [https://www. Pi-3-Model-B-p-2625.html] Base-Hat-for-Raspberry-Pi-p- 3-Axis-Digital 3186.html] 3034.html] Step 2. Plug the Grove Base Hat into Raspberry.
  • Page 12 Software Step 1. Follow Setting Software [http://wiki.seeedstudio.com/Grove_Base_Hat_for_Raspberry_Pi/#installation] to con gure the development environment. Step 2. Download the source le by cloning the grove.py library.  Note You are required to install python-mraa and python-upm, see the instruction here https://github.com/Seeed-Studio/pi_repo#mraa--upm-package-repository-for-raspberry-pi [https://github.com/Seeed-Studio/pi_repo#mraa--upm-package-repository-for-raspberry-pi] for more information.
  • Page 13 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki Step 3. Excute below commands to run the code.  cd grove.py/grove python grove_3_axis_compass_bmm150.py Following is the grove_3_axis_compass_bmm150.py code.  from __future__ import print_function import time, sys, signal, atexit, math...
  • Page 14 3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki print(" y: {0:.2f}".format(data[1]), end=' print(" z: {0:.2f}".format(data[2]), end=' print(" uT") xyHeading = math.atan2(data[0], data[1]) zxHeading = math.atan2(data[2], data[0]) heading = xyHeading heading < 0: heading += 2*math.pi heading > 2*math.pi: heading -= 2*math.pi...
  • Page 15: Tech Support

    3/18/2019 Grove - 3-Axis Digitial Compass v2.0 - Seeed Wiki You can quit this program by simply press Ctrl Resources [Library] Grove-3_Axis_Compass_V2.0 lib [https://github.com/Seeed- Studio/Grove_3_Axis_Compass_V2.0_BMM150] [PDF] BST-BMM150-Datasheet [https://github.com/SeeedDocument/Grove-3- Axis_Digitial_Compass_v2.0/raw/master/res/Datasheet.pdf] [Zip] Grove-3-Axis Digital Compass v2_Eagle File [https://github.com/SeeedDocument/Grove-3- Axis_Digitial_Compass_v2.0/raw/master/res/Eagle File.zip] Tech Support...

This manual is also suitable for:

101020492