Giter VIP home page Giter VIP logo

senz003-tilt-compensated-compass's Introduction

SENZ003-Tilt-Compensated-Compass

Translation

For English, please click here.

For Chinese, please click here.

Introduction

The LSM303DLH is a triple axis accelerometer combined with a triple axis magnetic sensor. This breakout board uses the LSM303DLH to give you the data you need to feed into a arduino microcontroller and calculate tilt-compensated output.

Application

  • Compensated compassing
  • Map rotation
  • Position detection
  • Motion-activated functions
  • Free-fall detection
  • Intelligent power-saving for handheld devices
  • Display orientation
  • Gaming and virtual reality input devices
  • Impact recognition and logging
  • Vibration monitoring and compensation

Specification

  • Power supply: 3.6~8V DC
  • Chip: LSM303DLH
  • ±1.3 to ±8,1 gauss magnetic field full-scale
  • ±2 g/±4 g/±8 g dynamically selectable fullscale
  • 16-bit data out
  • I2C serial interface
  • 2 independent programmable interrupt
  • generators for free-fall and motion detection
  • Embedded self-test
  • Accelerometer sleep-to-wakeup function
  • 6D orientation detection
  • Dimensions: 20.5mmx20.5mm
  • Weight: 1g

Tutorial

Connection Diagram

Sample Code

#define SensorLED   13
//Connect the sensor to digital Pin 3 which is Interrupts 1.
#define SensorINPUT  3  

unsigned char state = 0;

void setup() {
  pinMode(SensorLED, OUTPUT);
  pinMode(SensorINPUT, INPUT);
  //Trigger the blink function when the falling edge is detected
  attachInterrupt(1, blink, FALLING);  
}

void loop() {
  if (state != 0) {
    state = 0;
    digitalWrite(SensorLED, HIGH);
    delay(500);
  } 
  else
    digitalWrite(SensorLED, LOW);
}

//Interrupts function  
void blink() {
    state++;
}

senz003-tilt-compensated-compass's People

Contributors

njustcjj avatar

Watchers

James Cloos avatar

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.