Skip to content

Opening book details…

Can I read Arduino I2C Wire.h Library Example on EtoBox?

Arduino I2C Wire.h Library Example by Losa Fernandez is a document available to read on EtoBox.

What is Arduino I2C Wire.h Library Example about?

This code configures an Arduino to communicate with an HMC5883 magnetometer over I2C to continuously read magnetic field data from its three axes. It sets the I2C address and register for continuous measurement mode, then in a loop reads the 6 bytes of x, y, z axis data from register 3, combining the 2 bytes for each value, and prints the results to the serial monitor every 500ms.

Author
Losa Fernandez
Language
EN

More by Losa Fernandez

Browse all works by Losa Fernandez