Coder Social home page Coder Social logo

udawat / explore-labs-3d-accelerometer-3d-magnetometer-lsm303d-compass-breakout-board Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 4.0 350 KB

The LSM303D is a system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor that is ideal for making a tilt-compensated compass.

Home Page: http://www.explorelabs.com/explore-labs-3d-accelerometer-3d-magnetometer-lsm303d-compass-breakout-board-5v-ready-with-voltage-regulator

Eagle 99.77% Arduino 0.23%

explore-labs-3d-accelerometer-3d-magnetometer-lsm303d-compass-breakout-board's People

Contributors

udawat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

explore-labs-3d-accelerometer-3d-magnetometer-lsm303d-compass-breakout-board's Issues

LSM303D Click Interrupts

I am having trouble getting the click interrupts to work for the LSM303D. using the library provided by Pololu for arduino I can get this code working for the DLHC

#include <Wire.h>
#include <LSM303.h>
long thisLong = 0;
LSM303 compass;
const byte interruptPin = 2;

void setup()
{
  Serial.begin(9600);
  Wire.begin();
  compass.init();
  compass.enableDefault();  
  compass.writeAccReg(LSM303::CTRL3,     0b11000000);
  compass.writeAccReg(LSM303::CTRL0,     0b00000000);
  compass.writeAccReg(LSM303::CLICK_CFG, 0b00010000);
  compass.writeAccReg(LSM303::CLICK_THS, 0b00011111);
  compass.writeAccReg(LSM303::TIME_LIMIT, 0b00011111);

  delay(100);
  attachInterrupt(digitalPinToInterrupt(interruptPin), reset, CHANGE);
}

void loop()
{
  Serial.print(thisLong);
  Serial.println("");
  thisLong++;
  delay(100);
}

void reset() {
  thisLong = 0;
}

But when I try it on the LSM303D it doesn't seem to generate the interrupt. I can read the CLICK_SRC register and the interrupt shows active, but the INT1 pin never goes from low to high. Anyone work with these at all?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.