Repository navigation
Home
- Python初学者向け開発体制の構築
-
アップデート関係
- apt-get
- pip
- npm
- SSD Boot
- Display
- OLED display 128 x 64, 128 x 32 in white or blue (https://github.com/Naohiro2g/Adafruit_Python_SSD1306)
- OLED display 128 x 64, (128 x 32) in white or blue (https://github.com/Naohiro2g/luma.oled)
- IPS LCD Display 240 x 240 full color (https://github.com/Naohiro2g/Python_ST7789)
結構いい加減? 抵抗によるアドレス選択が0x78 or 0x7Aと書かれているが、実際には、0x78の状態で0x76になっている。
0x78 → 0x3C, 0x7A → 0x3Dと、1ビットシフトになっているものもある模様。
https://github.com/Naohiro2g/Adafruit_Python_BME280/blob/master/BME280_matplotlib.png https://github.com/Naohiro2g/Adafruit_Python_BME280/blob/master/Adafruit_BME280_Example_OLED_matplotlib.py
Add the line below to /boot/config.sys and reboot.
- dtoverlay=i2c-sensor,bme280,addr=0x76
The command lines to get values:
- cat /sys/bus/i2c/devices/1-0076/iio:device0/in_temp_input
- cat /sys/bus/i2c/devices/1-0076/iio:device0/in_humidityrelative_input
- cat /sys/bus/i2c/devices/1-0076/iio:device0/in_pressure_input
You need to be the 'root' to set values:
- su
- echo 4 > /sys/bus/iio/devices/iio:device0/in_pressure_oversamplig_ratio
I2C接続でOLED Display(I2C, SSD1306, 128 x 64)への表示、matplotlibによるリアルタイムグラフ表示ができている。今後、データロギング/表示機能追加。
https://github.com/Naohiro2g/Adafruit_Python_BME280 https://github.com/Naohiro2g/Adafruit_Python_BME280/blob/master/Adafruit_BME280_Example_OLED.py https://github.com/Naohiro2g/Adafruit_Python_BME280/blob/master/Adafruit_BME280_Example_OLED_matplotlib.py