For
English
, please clickhere.
For
Chinese
, please clickhere.
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.
- 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
- 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
#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++;
}