Example Code

Magnetometer with Arduino UNO

代码和文档

添加附件

Simple demo application that uses the Arduino UNO board and an I2C 3-axis magnetometer. A 3D cone, which represents an arrowhead, rotates according to the motion of the sensors w.r.t. the magnetic field. When the z-axis of the sensor points the north, the arrowhead points out of the screen. A moving average filter can be applied to smooth the signals.
破坏者
HW requirements: Arduino UNO board; HMC5883L 3-Axis magnetometer compatible (see datasheet for specifications).
SW requirements: LabVIEW 2011 or later and LabVIEW Interface for Arduino. 

Immagine board.jpgSharedScreenshot.jpg

NI社区“代码范例交流区”(Example Code Exchange)中的代码范例已获得MIT许可

评论
Mannaor
Member
Member
修改时间

Dear C.Fontana,

what I need to change if I will use MLX90393 magnetometer (not HMC5883L)

I tried to use your code but it doesn't show anything and also it doesn't show any error.

 

Best wishes,

Mannaor.