GithubHelp home page GithubHelp logo

sealhat / lsm303 Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.37 MB

library for LSM303AGR on the Atmel SMART ARM processor

License: MIT License

C 98.87% C++ 1.13% Makefile 0.01%
accelerometer imu magnetometer movement sensor

lsm303's People

Contributors

anthonykoutroulis avatar crustyauklet avatar hpan5 avatar

Watchers

 avatar  avatar  avatar

lsm303's Issues

Data Ready Interrupt - Accelerometer

A function to enable the interrupt for the FIFO watermark.

  • The function should return a standard error code or ERR_NONE
  • The function should have minimal parameters if it can use the current state to choose settings

I2C Speed issues

I2C bus throws many errors when working at 400kHz. seems to be very reliable at 200kHz.

  • Test the speed limit as configured
  • write code that can recover from a bus error
  • use o-scope to try to detect bus problems

Dynamic Watermark

The watermark should dynamically adapt to the bus speed and latency of the system.

When the fifo is read if the the FIFO count is too close to overflowing, too far past the watermark, or an actual overflow (as some examples) the watermark could be lowered.

The watermark could be raised if the watermark is below some default and the count is the same as the watermark several times in a row.

This would not happen that often since changing the watermark is a whole I2C transaction.

FIFO

The IMU should use the FIFO to read from the LSM303x.

  • A function to enable or disable the FIFO. This should have minimal parameters since most settings can be derived from the current IMU mode.
  • Watermark needs to be set at an appropriate level based on the current sample rate, bus speed, and interrupt latency, such that there are no overflows.
  • The FIFO read function should have an interface similar to a standard unix read function.
    • A buffer is passed in and filled with the number of samples available up to the buffer size.
    • The function should return the number of samples read.
    • The function should never read more samples than are available.
    • The function should never read more samples than fit in the buffer.
    • The function should return some kind of error to indicate an overflow has occurred or not.

Data Ready Interrupt - Magnetometer

A function to enable the interrupt for the magnetometer data ready signal.

  • The function should return a standard error code or ERR_NONE
  • The function should have minimal parameters if it can use the current state to choose settings

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.