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

Need some help with I2C sensor configuration #4

Closed
inlovewithsilver opened this issue Apr 1, 2022 · 3 comments
Closed

Need some help with I2C sensor configuration #4

inlovewithsilver opened this issue Apr 1, 2022 · 3 comments

Comments

@inlovewithsilver
Copy link

Hi, hishi, hope you are doing well. I'd like to firstly appreciate your work, but something going wrong with my I2C sensor - BMP280. For some reason I couldn't buy the product like Adafruit and SparkFun Qwiic SHIM for Raspberry Pi (https://www.sparkfun.com/products/15794), so I use GY-BMP280-3.3 as substitution. While I connecting the VCC, GND, SCL and SDA pins with Raspberry Pi (and CSB, SDO are left vacant), bikecomputer seems not have receive the data form BMP280, and the demo mode shows:

Loading original modules...
config : 2.914984 sec
GPS : True
GPS_ADAFRUIT_UART : False
GPS_I2C : False
ANT : False
RPi GPIO : True
I2C : True
...
detected I2c sensors:
PiTFT 2.8(r) : True

Is my connection wrong or the configuration is not completed? Looking forward to your solution, thanks again.

@hishizuka
Copy link
Owner

hishizuka commented Apr 2, 2022

Hi @inlovewithsilver , thank you for using my program!

How about the result of "$ i2cdetect -y 1"?
I think the address of your sensor is differnt from the address(0x77) in the program.
My result as follows,
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- 1d -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77

Probably, yours is 0x76.
If so, you need to modify modules/sensor/i2c/BMP280.py.
The address is specified in the line 62.

original: SENSOR_ADDRESS = 0x77
modified: SENSOR_ADDRESS = 0x76

Sincerely,

@inlovewithsilver
Copy link
Author

It works! The problem is just as you said, and thank you for giving me the solution. You are awesome!

@hishizuka
Copy link
Owner

@inlovewithsilver . Glad it worked! Enjoy!

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

2 participants