Comments: LSM303C 6DoF Hookup Guide

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Hi. Tried the "minimalist example" and all I get is failed setup. i'm running I2c mode and it is wired up via a arduino uno and a quic shield. NOTE: I get the same thing if wired directly to SDA/SCL

    If I run the arduino playground iIC scanner I can see a device at 0x1D and 0x1E which should be correct. After I changed the debug value in the header file and this is what I get:

    begin:: MAMU_HW_ERROR Failed setup. ::Reading address 0x20 I2C_ByteRead::Reading from I2C address: 0x1D, register 0x20 I2C_ByteRead::IMU_HW_ERROR Failed setup. ::Reading address 0x20 I2C_ByteRead::Reading from I2C address: 0x1D, register 0x20 I2C_ByteRead::IMU_HW_ERROR Failed setup. begin:: MAG_SetODR::MAG_ReadReg::Reading register 0x20 I2C_ByteRead::Reading from I2C address: 0x1E, register 0x20 I2C_ByteRead::Error: I2C buffer didn't get sent! I2C_ByteRead::Slave address: 0x1E I2C_ByteRead::Register: 0x20 Failed Read from MAG_CTRL_REG1 MAG_SetFullScale::MAG_ReadReg::Reading register 0x21 I2C_ByteRead::Reading from I2C address: 0x1E, register 0x21 I2C_ByteRead::Error: I2C buffer didn't get sent! I2C_ByteRead::Slave address: 0x1E I2C_ByteRead::Register: 0x21 MAG_BlockDataUpdate::MAG_ReadReg::Reading register 0x24 I2C_ByteRead::Reading from I2C address: 0x1E, register 0x24 I2C_ByteRead::Error: I2C buffer didn't get sent! I2C_ByteRead::Slave address: 0x1E I2C_ByteRead::Register: 0x24 MAG_XY_AxOperativeMode::MAG_ReadReg::Reading register 0x20 I2C_ByteRead::Reading from I2C address: 0x1E, register 0x20 I2C_ByteRead::Error: I2C buffer didn't get sent! I2C_ByteRead::Slave address: 0x1E I2C_ByteRead::Register: 0x20 MAG_Z_AxOperativeMode::MAG_ReadReg::Reading register 0x23 I2C_ByteRead::Reading from I2C address: 0x1E, register 0x23 I2C_ByteRead::Error: I2C buffer didn't get sent! I2C_ByteRead::Slave address: 0x1E I2C_ByteRead::Register: 0x23 MAG_SetMode::MAG_ReadReg::Reading register 0x22 I2C_ByteRead::Reading from I2C address: 0x1E, register 0x22 I2C_ByteRead::Error: I2C buffer didn't get sent! I2C_ByteRead::Slave address: 0x1E I2C_ByteRead::Register: 0x22 MAG_SetMode::Failed to read MAG_CTRL_REG3. 'Read': 0x0 ACC_SetFullScale::ACC_ReadReg::Reading address 0x23 I2C_ByteRead::Reading from I2C address: 0x1D, register 0x23 I2C_ByteRead::IMU_HW_ERROR Failed ACC read ACC_BlockDataUpdate::ACC_ReadReg::Reading address 0x20 I2C_ByteRead::Reading from I2C address: 0x1D, register 0x20 I2C_ByteRead::IMU_HW_ERROR ACC_EnableAxis::ACC_ReadReg::Reading address 0x20 I2C_ByteRead::Reading from I2C address: 0x1D, register 0x20 I2C_ByteRead::IMU_HW_ERROR ACC_EnableAxis:: Accel Error ACC_SetODR::ACC_ReadReg::Reading address 0x20 I2C_ByteRead::Reading from I2C address: 0x1D, register 0x20 I2C_ByteRead::IMU_HW_ERROR Failed setup.

    • Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      That being said, it seems like it might be a communication issue and I would make sure you are using a logic level converter or the proper logic levels. Additionally, this tutorial is fairly old and our TS team may need some time to re-familiarize themselves with this board if you do post a topic on our forums.

      • actually, it was the wrong code that was posted to the website. I posted this as an issue on the github page for the library. So n o it wasn't anything I had done and yes i had already checked with a logic analyser etc. Below is the reply to the issue i posted on github.

        Hi,

        Sorry about that. I updated the zip to point to the GitHub repo's ZIP.

        It looks like the libraries.properties was not updated with the code. That is what is needed to update the version number in the Arduino's library manager too. I'll take a look at that too.

  • Hello, I can't get the example codes to verify. the error message reads:

    Cannot declare variable 'myIMU' as to be of abstract type 'LSM303C'

    I do not have any experience with libraries, and would really love to get this to work.

    • It sounds like you may not have the library files installed properly. Please review our tutorial on how to install Arduino libraries and make sure your files are nested properly. Otherwise, please email techsupport @ sparkfun with your specific error messages and they will be able to assist you further.

      • I emailed them this morning as well. I have installed a couple of other libraries and examples to make sure my process was right, and they all compiled properly.


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!