Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: LSM303 Accelerometer + Compass library integration into ModularSensors

Home Forums Mayfly Data Logger LSM303 Accelerometer + Compass library integration into ModularSensors Reply To: LSM303 Accelerometer + Compass library integration into ModularSensors

#12846
Sara Damiano
Moderator

I’m sure the LSM303 could be integrated into ModularSensors. You should also be able to use it along with ModularSensors without actually integrating it. You might not be able to use the “logData” function though – you might have to break it up some.

So, do you have your program somewhere I could look at? Are you turning off the power to the sensor between reading? (Is your I2C port set to switched power?) Are you sure the sensor is powered when you’re trying to read it? Did you try putting a begin() for the LSM303 right before it’s read? In that library it looks like the begin() function sends an activate command which it may need after every power up (or even after every time I2C is disconnected).