Home - Naohiro2g/Raspberry-Pi-Projects GitHub Wiki

New

index

OLED SSD1306 互換品のI2Cアドレスについて

結構いい加減? 抵抗によるアドレス選択が0x78 or 0x7Aと書かれているが、実際には、0x78の状態で0x76になっている。

0x78 → 0x3C, 0x7A → 0x3Dと、1ビットシフトになっているものもある模様。

BME280 x OLED SSD1306 x matplotlib in Python

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

BME-280 Temperature/Humidity/Pressure Sensor via shell script with device tree overlay

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

My Raspberry Pi related projects or keyword list

Python

Pygame

Pygame Zero

PS3 Gamepad

Mu Editor, Jupyter Notebook

IDLE

Thonny

OpenCV

RetroPie

GPIO Zero

Recipes

MPC3004/MCP3008 10-bit A/D Converter, SPI

MPC-6050 3-axis gyroscope, 3-axis accelerometer, I2C

PCA9685 16-ch 12-bit PWM Controller, I2C

SG90(compatible) Micro Servo Moter

DC Motor TB6612FNG 2-ch Motor Driver

BME280 Environmental Sensor (Temperature Humidity Pressure), i2C / SPI

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

Rotary Encoder / with LED

CdS Cell Light Sensor

Minecraft

USB Webcam fswebcam

Scratch 1.4 / 2.0 / 3.0 / Extension

Ras-Pi Settings

USB Boot

Swap

zRAM

Voice

OpenJTalk

Julius

Google AIY Project: Voice Kit

Sound / Visual, and Instruments

SonicPi

OSC - MIDI

raspi2png Screen shot capture and keybind

Mathematica

OMXplayerGUI

Node-RED

Not Raspberry Pi related

ESP32
ESP-EYE
MicroPython
Pyboard
Arduino