6 Replies Latest reply on Aug 22, 2015 12:37 AM by rohitsay89

    **B0100000063f694 error serial out

    AndrewSexton

      Hi I have just bought a honeywell HMC5883l to use as a 3-axis magnetometer. I am using the Sparkfun get started to guide to try to get readings from the I2C interface Triple Axis Magnetometer - HMC5883L Breakout Quickstart Guide - SparkFun Electronics. Unfortunately when I open the serial monitor the line "**B0100000063f694" appears. I have supplied the below code that I am using with this board. I made changes to the code supplied on the Sparkfun website as the Wire.h library won't work with the Galileo unless these changes can be made. If anyone has any suggestion on how to get the serial monitor outputting information from the honeywell board I'd be very grateful!

       

      Thanks!

       

      /*

      An Arduino code example for interfacing with the HMC5883

       

       

      by: Jordan McConnell

      SparkFun Electronics

      created on: 6/30/11

      license: OSHW 1.0, http://freedomdefined.org/OSHW

       

       

      Analog input 4 I2C SDA

      Analog input 5 I2C SCL

      */

       

       

      #include <Wire.h> //I2C Arduino Library

       

       

      #define address 0x1E //0011110b, I2C 7bit address of HMC5883

       

       

      void setup(){

        //Initialize Serial and I2C communications

        Serial.begin(9600);

        Wire.begin();

       

        //Put the HMC5883 IC into the correct operating mode

        Wire.beginTransmission(address); //open communication with HMC5883

        Wire.write(0x02); //select mode register

        Wire.write(0x00); //continuous measurement mode

        Wire.endTransmission();

      }

       

       

      void loop(){

       

        int x,y,z; //triple axis data

       

       

        //Tell the HMC5883 where to begin reading data

        Wire.beginTransmission(address);

        Wire.write(0x03); //select register 3, X MSB register

        Wire.endTransmission();

       

       

      //Read data from each axis, 2 registers per axis

        Wire.requestFrom(address, 6);

        if(6<=Wire.available()){

          x = Wire.read()<<8; //X msb

          x |= Wire.read(); //X lsb

          z = Wire.read()<<8; //Z msb

          z |= Wire.read(); //Z lsb

          y = Wire.read()<<8; //Y msb

          y |= Wire.read(); //Y lsb

        }

       

        //Print out values of each axis

        Serial.print("x: ");

        Serial.print(x);

        Serial.print("  y: ");

        Serial.print(y);

        Serial.print("  z: ");

        Serial.println(z);

       

        delay(250);

      }