LoginSignup
0

More than 5 years have passed since last update.

3軸デジタルコンパスHMC5883Lを使ってみる

Last updated at Posted at 2017-04-05

概要

i2cで動作する3軸デジタルコンパスHMC5883Lの使い方です。
動作しないモジュールも出回っているみたいなので動かなくて悩むまえに確認してください。

動作しないモジュールについての記事はこちら↓
i2cアドレスが0x0dのHMC5883Lモジュールについて

確認箇所

↓ 石はL883 2549 であることを確認する。
20170401_145740-1.jpg

↓ 0x1eで認識されることを確認する。
HMC5883L-0x0e.PNG

↓ピンアサイン(参考)
20170401_145800-1.jpg

コード(c言語)

コード実行結果

北(0)から東(90)の方向へ回転している様子
HMC5883.PNG

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0