Giter Club home page Giter Club logo

swire's People

Contributors

bxparks avatar raemondbw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bxparks

swire's Issues

Issues reading MPU6050

i am having a hardtime reading the value from MPU6050
the address is 0x68 but can you explain why its changing to 0xD1 in requestFrom(uint8_t address, uint8_t numBytes)

if (writeByte(((current_rw_address << 1) | 1) & 0xFF)) {
stop();
return 0;
}

i am new to this library so dont mind if i made mistake

A few things I noticed.

Hi, I have not tested your SWire library yet, but I noticed a few things.

The Wire.available() should return the number of valid bytes in the rxBuffer.

Writing a 16-bit value is not according to the Arduino Wire library. Please don't add that. It is very confusing and might result into different functionality between the Arduino Wire library and your SWire library. I will guaranteed cause a lot of trouble.

You mix HIGH and LOW with 1 and 0. They are the same, but from a programmers viewpoint they are different things. Perhaps you can make it more obvious what is used in the code.

The buffer length is only 8 bytes ? The Arduino Wire library for AVR chips has 32 bytes.

Is it possible to do a Wire.beginTransmission() followed by a Wire.endTransmission() to test the ACK of a sensor ? That is used in i2c scanner sketches. I did not test it, and I can not tell from the source if that will work.

What about making it more compatible ? Perhaps a (dummy) setClock(), a peek(), a end() and a flush(), en perhaps some functions from the Stream class.

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.