Search the Community
Showing results for tags 'hmc5883l'.
-
I am working on TM4C1294XL board and through Energia platform. I am trying to interface HMC5883L of GY-80 with TM4C1294XL board. I am getting static outputs irrespective of whether I initialize all the essential registers or initialize none, the static outputs do not change in both cases. I am pasting the code below, I suspect that something should be wrong with the code as there nothing much to do in connection (only four wires needed). #include "Wire.h" #define cra 0x00 #define crb 0x01 #define modeReg 0x02 #define data_X_MSB 0x03 #define data_X_LSB 0x04 #define data_Y_MSB 0x07 #defin
- 2 replies
-
- hmc5883l
- magnetometer
-
(and 4 more)
Tagged with:
-
Hi, I'm new with Energia but not with Arduino. I'm not able to communicate with HMC5883L throw I2C. The board is launchpad with msp430g2553 microcontroller. I read some threads about this issue but I didn't find a solution. #include <Wire.h>#define address 0x1E //0011110b, I2C 7bit address of HMC5883void setup(){ Serial.begin(9600); // start serial for output Wire.begin(); // join i2c bus (address optional for master) //Put the HMC5883 IC into the correct operating mode Wire.beginTransmission(address); //open communication with HMC5883 //Write CRA (00)