Dobrica Pavlinušić's random unstructured stuff
Orange Pi Plus 2: Revision 9
http://www.orangepi.org/orangepiplus2/ https://www.armbian.com/orange-pi-plus-2/
SoC H3 @ 1.2GHz[1] bme280 i2c temperature/humidity/pressure/home/dpavlin/linux-gpio-pinout/overlay-load.sh /boot/dtb-`uname -r`/overlay/*h3*i2c0* root@opip:/home/dpavlin/linux-gpio-pinout# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- 76 -- Check i2c address in datasheet
Connecting SDO to GND results in slave root@opip:/home/dpavlin/linux-gpio-pinout# zgrep BMP280 /proc/config.gz CONFIG_BMP280=m CONFIG_BMP280_I2C=m CONFIG_BMP280_SPI=m root@opip:/home/dpavlin/linux-gpio-pinout# echo bmp280 0x76 > /sys/bus/i2c/devices/i2c-2/new_device root@opip:/home/dpavlin/linux-gpio-pinout# [Sat Jan 2 11:43:58 2021] i2c i2c-2: new_device: Instantiated device bmp280 at 0x76 [Sat Jan 2 11:43:58 2021] bmp280 2-0076: supply vddd not found, using dummy regulator [Sat Jan 2 11:43:58 2021] bmp280 2-0076: supply vdda not found, using dummy regulator [Sat Jan 2 11:43:58 2021] bmp280 2-0076: bad chip id: expected 58 got 60 [Sat Jan 2 11:43:58 2021] bmp280: probe of 2-0076 failed with error -22 So it's not BMP280, but BME280.
Using https://www.raspberrypi-spy.co.uk/2016/07/using-bme280-i2c-temperature-pressure-sensor-in-python/ root@opip:/home/dpavlin# ./bme280.py Chip ID : 96 Version : 0 Temperature : 24.65 C Pressure : 998.4304559219445 hPa Humidity : 41.458674890198445 %e So let's try with correct sensor name root@opip:/sys/bus/i2c/devices/i2c-2# echo bme280 0x76 > /sys/bus/i2c/devices/i2c-2/new_device [Sat Jan 2 12:32:01 2021] bmp280 2-0076: supply vddd not found, using dummy regulator [Sat Jan 2 12:32:01 2021] bmp280 2-0076: supply vdda not found, using dummy regulator [Sat Jan 2 12:32:01 2021] i2c i2c-2: new_device: Instantiated device bme280 at 0x76 root@opip:~# apt install libiio-utils root@opip:~# iio_info Library version: 0.16 (git tag: v0.16) Compiled with backends: local xml ip usb serial IIO context created with local backend. Backend version: 0.16 (git tag: v0.16) Backend description string: Linux opip 5.10.0-rc7-sunxi #20.11.3 SMP Fri Dec 11 21:18:30 CET 2020 armv7l IIO context has 1 attributes: local,kernel: 5.10.0-rc7-sunxi IIO context has 1 devices: iio:device0: bme280 3 channels found: humidityrelative: (input) 2 channel-specific attributes found: attr 0: input value: 40775 attr 1: oversampling_ratio value: 16 pressure: (input) 2 channel-specific attributes found: attr 0: input value: 99.809761718 attr 1: oversampling_ratio value: 16 temp: (input) 2 channel-specific attributes found: attr 0: input value: 25350 attr 1: oversampling_ratio value: 2 collect using telegrafroot@opip:/etc/telegraf/telegraf.d# ../telegraf --config iio.conf --test 2021-01-02T12:39:39Z I! Starting Telegraf > iio,host=opip,name=bme280 humidityrelative=39.934,pressure=99.801214843,temperature=25.66 1609591179000000000 |