GithubHelp home page GithubHelp logo

earsuit / i2c Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 0.0 35 KB

A free I2C library for Arduino Nano and Mega with time-out function.

License: MIT License

C++ 100.00%
arduino arduino-library arduino-mega arduino-nano

i2c's People

Contributors

earsuit avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

i2c's Issues

How to use this library with esp32s

Hi i want to use this library with esp32, but when i upload example with this library that provide the error like below:
MPU9250:100:5: error: expected constructor, destructor, or type conversion before '(' token

ISR(TIMER1_COMPA_vect){

     ^

MPU9250:100:4: error: expected constructor, destructor, or type conversion before '(' token

 ISR(TIMER1_COMPA_vect){

    ^

C:\Program Files (x86)\Arduino\libraries\I2C-master\examples\MPU9250\MPU9250.ino: In function 'void timerInterruptSetup()':

MPU9250:150:5: error: 'TCCR1A' was not declared in this scope

     TCCR1A = 0x00;

     ^

MPU9250:151:5: error: 'TCCR1B' was not declared in this scope

     TCCR1B = (_BV(WGM12)) | (_BV(CS11)) | (_BV(CS10));  //CTC mode, clk/64

     ^

In file included from sketch\MPU9250.ino.cpp:1:0:

MPU9250:151:19: error: 'WGM12' was not declared in this scope

     TCCR1B = (_BV(WGM12)) | (_BV(CS11)) | (_BV(CS10));  //CTC mode, clk/64

                   ^

C:\Users\Haseo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1\cores\esp32/Arduino.h:105:25: note: in definition of macro '_BV'

 #define _BV(b) (1UL << (b))

                         ^

MPU9250:151:34: error: 'CS11' was not declared in this scope

     TCCR1B = (_BV(WGM12)) | (_BV(CS11)) | (_BV(CS10));  //CTC mode, clk/64

                                  ^

C:\Users\Haseo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1\cores\esp32/Arduino.h:105:25: note: in definition of macro '_BV'

 #define _BV(b) (1UL << (b))

                         ^

MPU9250:151:48: error: 'CS10' was not declared in this scope

     TCCR1B = (_BV(WGM12)) | (_BV(CS11)) | (_BV(CS10));  //CTC mode, clk/64

                                                ^

C:\Users\Haseo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1\cores\esp32/Arduino.h:105:25: note: in definition of macro '_BV'

 #define _BV(b) (1UL << (b))

                         ^

MPU9250:152:5: error: 'OCR1A' was not declared in this scope

     OCR1A = OUTPUT_COMPARE; //set to 200ms

     ^

MPU9250:153:5: error: 'TCNT1' was not declared in this scope

     TCNT1 = 0x00; //initialise the counter

     ^

MPU9250:154:5: error: 'TIMSK1' was not declared in this scope

     TIMSK1 = _BV(OCIE1A);  //Output Compare A Match Interrupt Enable

     ^

In file included from sketch\MPU9250.ino.cpp:1:0:

MPU9250:154:18: error: 'OCIE1A' was not declared in this scope

     TIMSK1 = _BV(OCIE1A);  //Output Compare A Match Interrupt Enable

                  ^

C:\Users\Haseo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1\cores\esp32/Arduino.h:105:25: note: in definition of macro '_BV'

 #define _BV(b) (1UL << (b))

                         ^

exit status 1
expected constructor, destructor, or type conversion before '(' token

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.