GithubHelp home page GithubHelp logo

adafruit_l3gd20's Introduction

Warning: Library Deprecated

This library is deprecated, and as of 17 October 2016 this library will no longer appear in the Arduino Library Manager. Any new projects should use the newer library available here: https://github.com/adafruit/Adafruit_L3GD20_U

L3GD20 Triple Axis Gyroscope

This is a library for the L3GD20 Adafruit Triple-Axis Gyro sensor

Designed specifically to work with the Adafruit L3GD20/L3GD20H Breakout ----> https://www.adafruit.com/products/1032

These sensors use I2C or SPI to communicate, 2 pins (I2C) or 4 pins (SPI) are required to interface.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Check out the links above for our tutorials and wiring diagrams

Written by Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution

To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_L3GD20. Check that the Adafruit_L3GD20 folder contains Adafruit_L3GD20.cpp and Adafruit_L3GD20.h

Place the Adafruit_L3GD20 library folder your (arduinosketchfolder)/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.

adafruit_l3gd20's People

Contributors

driverblock avatar ladyada avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_l3gd20's Issues

No need to wait for Wire.available().

This code is not correct : "while (Wire.available() < 6);".
When the Wire.requestFrom() returns, the I2C transmission has completely finished, and the data is in the buffer.

i2c for Arduino Mega declaring pins 20, 21 initializes as SPI

I'm not sure what the exact behavior is supposed to be, but you can instantiate the l3d20 object on the Uno specifying the i2c pins.

#define GYRO_CS 4 // labeled CS
#define GYRO_DO 5 // labeled SA0
#define GYRO_DI A4  // labeled SDA
#define GYRO_CLK A5 // labeled SCL
Adafruit_L3GD20 gyro(GYRO_CS, GYRO_DO, GYRO_DI, GYRO_CLK);

However, if you adjust this for the Arduino Mega 2560

#define GYRO_CS 4 // labeled CS
#define GYRO_DO 5 // labeled SA0
#define GYRO_DI 20  // labeled SDA
#define GYRO_CLK 21 // labeled SCL
Adafruit_L3GD20 gyro(GYRO_CS, GYRO_DO, GYRO_DI, GYRO_CLK);

This fails to initialize as i2c.

If I simply declare:

Adafruit_L3GD20 gyro;

i2c is selected correctly for the Arduino Mega 2560

Gyro code give errors

The gyro code give these errors.
Pls help
In file included from Adafruit_L3GD20_test.ino:19:
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:9: error: stray '\302' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:9: error: stray '\267' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:9: error: stray '\302' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:9: error: stray '\267' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: stray '#' in program
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:4: error: expected unqualified-id before '<' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected unqualified-id before '=' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected unqualified-id before '<' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected constructor, destructor, or type conversion before '.' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected unqualified-id before '<' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected unqualified-id before '<' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected constructor, destructor, or type conversion before '.' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected unqualified-id before '<' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected constructor, destructor, or type conversion before '.' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:543: error: expected unqualified-id before '<' token
C:\Users\Neelesh.kumar\Documents\Arduino\libraries\gyro/Adafruit_L3GD20.h:587: error: expected unqualified-id before numeric constant
Adafruit_L3GD20_test.ino: In function 'void setup()':
Adafruit_L3GD20_test:42: error: 'Serial' was not declared in this scope
Adafruit_L3GD20_test:45: error: 'gyro' was not declared in this scope
Adafruit_L3GD20_test.ino: In function 'void loop()':
Adafruit_L3GD20_test:56: error: 'gyro' was not declared in this scope
Adafruit_L3GD20_test:57: error: 'Serial' was not declared in this scope
Adafruit_L3GD20_test:60: error: 'delay' was not declared in this scope

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.