Hi,
First, i'am french, excuse my bad english...
I have a problem with my orangepi zero using a bme280 weather sensor with i2c. (I have 2 sensors)
After long search and try, i've found the way to make this sensor working with the orange pi zero, by reading the datasheet where it's indicated that you must put CSB to Vdd to select i2c interface.
!!! - I never wired this pin to my rapsberry pi and it always work , never see in any tuto too!!!
Th problem is that I don't read good values, it seem that the values are always the same, based on calibration . I try to figure out what happen but i'm not so friendly with i2c protocol.
Here are the results of my tests from my rapsberry, the 2 sensors works fine.
pi@raspberrypi:~/i2cBME280 $./bme280-1.py
temp : 22.00 ℃
pressure : 1033.26 hPa
hum : 52.78 %
pi@raspberrypi:~/i2cBME280 $ i2cdump -y 1 0x76
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 94 50 89 42 7c 2e f0 06 36 70 c2 68 32 00 62 8f ?P?B|.??6p?h2.b?
90: 2f d6 d0 0b ec 19 47 00 f9 ff ac 26 0a d8 bd 10 /?????G.?.?&????
a0: 00 4b 08 00 00 00 00 00 00 00 00 00 33 00 00 c0 .K?.........3..?
b0: 00 54 00 00 00 00 60 02 00 01 ff ff 1f 71 03 00 .T....`?.?..?q?.
c0: 00 00 27 ff 00 00 00 00 01 00 00 00 00 00 00 00 ..'.....?.......
d0: 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 `...............
e0: 00 76 01 00 12 03 00 1e 4e 41 ff ff ff ff ff ff .v?.??.?NA......
f0: ff 00 01 00 27 a0 00 51 47 00 81 8b 00 6a d8 80 ..?.'?.QG.??.j??
pi@raspberrypi:~/i2cBME280 $ i2cdump -y 1 0x77
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 91 70 89 3f 60 2e f0 06 2f 6f 7f 67 32 00 3a 8f ?p??`.??/o?g2.:?
90: 50 d6 d0 0b e6 1d 00 00 f9 ff ac 26 0a d8 bd 10 P?????..?.?&????
a0: 00 4b b2 00 00 00 00 00 00 00 00 00 33 00 00 c0 .K?.........3..?
b0: 00 54 00 00 00 00 60 02 00 01 ff ff 1f 71 03 00 .T....`?.?..?q?.
c0: 00 00 27 ff 00 00 00 00 01 00 00 00 00 00 00 00 ..'.....?.......
d0: 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 `...............
e0: 00 72 01 00 12 0c 00 1e 43 41 ff ff ff ff ff ff .r?.??.?CA......
f0: ff 00 01 00 27 a0 00 4d 76 00 80 dc 00 6e 25 80 ..?.'?.Mv.??.n%?
And then from my orangepi zero :
cedricici@orangepizero:~/bme280$ ./bme280.py
temp : 20.68 ℃
pressure : 705.81 hPa
hum : 80.81 %
cedricici@orangepizero:~/bme280$ ./bme280-1.py
temp : 21.76 ℃
pressure : 680.09 hPa
hum : 76.92 %
cedricici@orangepizero:~/bme280$ i2cdump -y 0 0x76
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 94 50 89 42 7c 2e f0 06 36 70 c2 68 32 00 62 8f ?P?B|.??6p?h2.b?
90: 2f d6 d0 0b ec 19 47 00 f9 ff ac 26 0a d8 bd 10 /?????G.?.?&????
a0: 00 4b 08 00 00 00 00 00 00 00 00 00 33 00 00 c0 .K?.........3..?
b0: 00 54 00 00 00 00 60 02 00 01 ff ff 1f 60 03 00 .T....`?.?..?`?.
c0: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 `...............
e0: 00 76 01 00 12 03 00 1e 4e 41 ff ff ff ff ff ff .v?.??.?NA......
f0: ff 00 00 00 00 00 00 80 00 00 80 00 00 80 00 80 .......?..?..?.?
cedricici@orangepizero:~/bme280$ i2cdump -y 0 0x77
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 91 70 89 3f 60 2e f0 06 2f 6f 7f 67 32 00 3a 8f ?p??`.??/o?g2.:?
90: 50 d6 d0 0b e6 1d 00 00 f9 ff ac 26 0a d8 bd 10 P?????..?.?&????
a0: 00 4b b2 00 00 00 00 00 00 00 00 00 33 00 00 c0 .K?.........3..?
b0: 00 54 00 00 00 00 60 02 00 01 ff ff 1f 60 03 00 .T....`?.?..?`?.
c0: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 `...............
e0: 00 72 01 00 12 0c 00 1e 43 41 ff ff ff ff ff ff .r?.??.?CA......
f0: ff 00 00 00 00 00 00 80 00 00 80 00 00 80 00 80 .......?..?..?.?
It's clear that reading values are not set correctly ( 0xF7 to 0xFE) .
The config registers (0xF2 0xF4 0xF5 are null too , but the bme280.py write this registers without any error?
I use the same wiring on the two board (orange & raspberry) .
Has someone see something like this before?
Thank you.