orgua / ilib Goto Github PK
View Code? Open in Web Editor NEWLibrary for various I2C-Sensors with examples for Arduino
License: GNU General Public License v2.0
Library for various I2C-Sensors with examples for Arduino
License: GNU General Public License v2.0
I found your library from this (https://www.best-microcontroller-projects.com/bmp280.html) article and have found it to be perfect for my needs. However, it did not work on my chosen micro controller as-is. Some of the dependencies must be different when using ESP8266 based micro controllers. For my use, I have made the following changes that seem to be working for me. Since these changes are to one of you base classes, I don't know if there are any ramifications that should be noted.
`WirePlus::WirePlus()
{
Wire.begin(); // I2C as Master
#ifdef ESP8266
// DEC - TODO: I've added this as PORTC, TWBR were undefined
// when using on ESP8266 board. Arduino.cc pages state
// that PORTC has to do with analog pins. Why would this
// digital port library need to change these? Need to
// figure this out.
Wire.setClock(400000L);
#else
bitSet(PORTC, 4); // deactivate internal pull-ups for twi
bitSet(PORTC, 5); // as per note from atmega8 manual pg167
// switch to 400KHz I2C - eheheh
TWBR = ((F_CPU / 400000L) - 16) / 2; // see twi_init in Wire/utility/twi.c
#endif // ESP8266
};
`
In the file "i2c.h" in the function "read" is a Wire.endTransmission at the end, after a Wire.requestFrom.
That last Wire.endTransmission can be deleted, since Wire.requestFrom should not be followed by a Wire.endTransmission.
The Wire.beginTransmission and Wire.endTransmission are only used when writing data.
Hello,
Congratulations for your very useful library! I would like to ask if you are planning to add support for the BME280 sensor?
Thanks,
Hi, great library! Thanks!
I just ran your BMP 280 example code. Do you plan to add support for reading the humidity?
Rune
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.