ADC
MCP3008
- MCP3008 | Raspberry Pi Analog to Digital Converters | Adafruit Learning System
- 14. API - SPI Devices — Gpiozero 1.4.1 Documentation
- Raspberry Pi ADC: MCP3008 Analog to Digital Converter
I2C sensors
MPU6050 (Gyroscope)
- MCP3008 | Raspberry Pi Analog to Digital Converters | Adafruit Learning System
- GY-521 MPU6050模块 三维角度传感器6DOF 三轴加速度计电子陀螺仪-tmall.com天猫
- GitHub - Tijndagamer/mpu6050: A Python module for accessing the MPU-6050 digital accelerometer and gyroscope on a Raspberry Pi.
BMP280 (Temperature, Pressure and Altitude)
- GY-BMP280-3.3 高精度大气压强传感器模块 高度计传感器-tmall.com天猫
- GitHub - adafruit/Adafruit_CircuitPython_BMP280: CircuitPython driver for the BMP280
# Example
import board
import digitalio
import busio
import time
from adafruit_bmp280 import adafruit_bmp280
# Create library object using our Bus I2C port
i2c = busio.I2C(board.SCL, board.SDA)
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=0x68)
bmp280.seaLevelhPa = 1013.25
while True:
print("\nTemperature: %0.1f C" % bmp280.temperature)
print("Pressure: %0.1f hPa" % bmp280.pressure)
print("Altitude = %0.2f meters" % bmp280.altitude)
time.sleep(2)