Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C not working correctly #6

Open
bill-orange opened this issue Dec 15, 2019 · 9 comments
Open

I2C not working correctly #6

bill-orange opened this issue Dec 15, 2019 · 9 comments

Comments

@bill-orange
Copy link

I am using the Arduino 1.8.9 IDE on a ATTiny85 clone with a BME380. 10K pullups are on the I2C lines. An external battery assures that 5v is adequate.

I can compile properly. I can serial print to NotePad using keyboard.h. I can blink LEDs successfully.

What I can not do is successfully implement I2C. I do not know how to troubleshoot the problem.

If I use I2C scanner, the device is detected but I get back address 0x40 for a BME280. Clearly this is wrong. The address is 0x76.

If I try reading the BME280 (at any address), I get decimal 12378. Something is definitely wrong. I am very familiar with the ESP8266 family but I am too new with this device to work toward a solution by myself.

@technoblogy
Copy link
Owner

Are you using the Arduino IDE? If so, which ATtiny85 core are you using?

You say it's an ATtiny85 clone. Which one exactly?

@bill-orange
Copy link
Author

bill-orange commented Dec 15, 2019

I am using Digispark (default) on this board (more or less, the resistor arrangement is slightly different):

attiny

@technoblogy
Copy link
Owner

I'm not sure the Digispark supports I2C - search the web for information. I recommend using Spence Konde's ATTinyCore which does support I2C.

@bill-orange
Copy link
Author

That could be the problem. I have certainly tried everything I can think of. Their drawing shows I2C connections but I don't think that is a reliable indicator.
dc7h4n3-51e6389c-5f86-4fb2-a7ad-34f75f672003

@technoblogy
Copy link
Owner

technoblogy commented Dec 16, 2019 via email

@aholz
Copy link

aholz commented May 24, 2020

You have not disclosed your code. Maybe you did not included <Wire.h> before <TinyBME280.h>?
Because on the ATTiny, I2C is implemented in software. But it works, I am running with BME280.

@nhabongo
Copy link

nhabongo commented Dec 7, 2020

Hi, I am also trying to use the TinyBME280 lib with a Digispark attiny85 board. It gives me accurate measurements for temperature and humidity but returns a very low value for pressure. Using Adafruit_BME280 lib on an arduino uno i get a value of 92239 while digispark give me 26797. Any ideas ?

@technoblogy
Copy link
Owner

The Digispark causes a lot of compatibility problems. Try a standard ATtiny85.

@nhabongo
Copy link

nhabongo commented Dec 8, 2020

Unfortunately that is true. I am giving up on digispark. Thanks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants