Board-dat/MPC/MPC1090-dat/MPC1090-dat.md
... ...
@@ -7,7 +7,7 @@ https://www.electrodragon.com/product/1-3-oled-display-mini-shield-for-raspberry
7 7
8 8
- [legacy wiki page](https://www.electrodragon.com/w/Category:OLED#RPI_OLED)
9 9
10
-
10
+- [[display-SDK-dat]]
11 11
12 12
## Board map
13 13
... ...
@@ -51,4 +51,6 @@ https://www.electrodragon.com/product/1-3-oled-display-mini-shield-for-raspberry
51 51
52 52
## ref
53 53
54
+- [[RPI-SDK-dat]]
55
+
54 56
- [[MPC1090]] - [[MPC]]
... ...
\ No newline at end of file
Board-dat/MPC/MPC1108-dat/2025-08-07-18-53-33.png
... ...
Binary files /dev/null and b/Board-dat/MPC/MPC1108-dat/2025-08-07-18-53-33.png differ
Board-dat/MPC/MPC1108-dat/MPC1108-dat.md
... ...
@@ -7,7 +7,7 @@ https://www.electrodragon.com/product/smart-fan-cooling-control-board-for-raspbe
7 7
![](2024-07-08-18-28-25.png)
8 8
9 9
10
-
10
+![](2025-08-07-18-53-33.png)
11 11
12 12
## Function
13 13
Chip-cn-dat/allwinner-dat/allwinner-D1-dat.md
... ...
@@ -50,6 +50,15 @@ e0d72713565f4424ea43c07e15a38139 tina-d1-h.tar.bz2.08
50 50
- TF卡完整烧写工具: win32diskimager-1.0.0-install.exe
51 51
- TF卡格式化工具:SDCardFormatterv5_WinEN.zip
52 52
53
+
54
+## after flash
55
+
56
+烧录完成以后,就可以弹出TF卡,并将其插到开发板正面 黑色字体序号 11.TF卡卡槽位置处,此时可以使用 杜邦线 连接 PE2 PE3 GND使用串口进行登录,也可以使用 adb shell 直接连接 ADB进行登录访问。
57
+
58
+注意:D1s因TF卡和CKlink引脚存在复用关系,需将拨码开关 SW1 拨至数字方向,才可以支持TF卡启动
59
+
53 60
## ref
54 61
62
+- https://dongshanpi.com/DongshanPI-D1s/03-1_FlashSystem/#_7
63
+
55 64
- [[allwinner-dat]]
... ...
\ No newline at end of file
Chip-dat/TI-dat/TI-sensor-dat/LM75-dat/LM75-dat.md
... ...
@@ -34,6 +34,9 @@ https://github.com/Edragon/RPI
34 34
35 35
- [[RPI-dat]]
36 36
37
+- [[py-LM75-dat.py]]
38
+
39
+
37 40
38 41
## ref
39 42
Chip-dat/TI-dat/TI-sensor-dat/LM75-dat/py-LM75-dat.py
... ...
@@ -0,0 +1 @@
1
+
SDK-dat/RPI-SDK-dat/RPI-SDK-dat.md
... ...
@@ -3,7 +3,7 @@
3 3
4 4
- [[RPI-OS-dat]]
5 5
6
-- [[python-dat]]
6
+- [[python-dat]] - [[python-error-dat]]
7 7
8 8
- [[rpi-python-dat]] - [[rpi-c-dat]]
9 9
... ...
@@ -13,6 +13,8 @@
13 13
14 14
- [[RPI-tools-dat]]
15 15
16
+- [[interface-SDK-dat]] - [[SDK-dat]]
17
+
16 18
## Usage and Software
17 19
18 20
copy file to /boot/myfiles
... ...
@@ -61,4 +63,6 @@ can use commands nohup to run script in background for long term.
61 63
62 64
## ref
63 65
64
-- [[RPI-dat]]
... ...
\ No newline at end of file
0
+- [[RPI-dat]]
1
+
2
+- [[RPI]]
... ...
\ No newline at end of file
SDK-dat/display-sdk-dat/2025-08-07-18-41-32.png
... ...
Binary files /dev/null and b/SDK-dat/display-sdk-dat/2025-08-07-18-41-32.png differ
SDK-dat/display-sdk-dat/display-sdk-dat.md
... ...
@@ -1,9 +1,9 @@
1 1
2 2
3
-# display
3
+# display-sdk-dat
4 4
5 5
6
-## FTF
6
+## TFT
7 7
8 8
TFT_eSPI
9 9
... ...
@@ -11,4 +11,28 @@ TFT_eSPI
11 11
## OLED
12 12
13 13
14
-- [[oled-dat]]
... ...
\ No newline at end of file
0
+- [[oled-dat]]
1
+
2
+run c file oled_1in3
3
+
4
+ root@raspberrypi:/home/pi/1.3-OLED-SH106/bcm2835# ./oled_1in3
5
+ bcm2835 init success !!!
6
+ USE_SPI
7
+ **********Init OLED**********
8
+ OLED Show
9
+ OLED Clear
10
+ OLED Draw Line
11
+ OLED Draw Rectangle
12
+ OLED Draw Rings
13
+ OLED Display String
14
+ Showing
15
+
16
+![](2025-08-07-18-41-32.png)
17
+
18
+
19
+
20
+
21
+
22
+## ref
23
+
24
+- [[SDK-dat]]
... ...
\ No newline at end of file
SDK-dat/interface-SDK-dat/interface-SDK-dat.md
... ...
@@ -0,0 +1,49 @@
1
+
2
+# interface-SDK-dat
3
+
4
+- [[interface-dat]]
5
+
6
+## python on RPI
7
+
8
+- [[RPI-sdk-dat]] - [[python-dat]] - [[python-env-dat]]
9
+
10
+### I2C scan
11
+
12
+- [[py-rpi-i2c-scan-dat]] - [[LM75-dat]]
13
+
14
+output
15
+
16
+ root@raspberrypi:~# python py-rpi-i2c-scan.py
17
+ ============================================================
18
+ Raspberry Pi I2C Address Scanner
19
+ ============================================================
20
+ I2C Scanner initialized on bus 1
21
+ Scanning I2C bus for devices...
22
+ 0 1 2 3 4 5 6 7 8 9 a b c d e f
23
+ 00: -- -- -- -- -- -- -- -- -- -- -- -- --
24
+ 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
25
+ 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
26
+ 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
27
+ 40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
28
+ 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
29
+ 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30
+ 70: -- -- -- -- -- -- -- --
31
+
32
+ Found 1 device(s):
33
+ ------------------------------------------------------------
34
+ Address: 0x48 ( 72) - ADS1115/ADS1015 ADC or TMP102 Temperature Sensor
35
+
36
+ Scan complete!
37
+
38
+ Note: Make sure I2C is enabled in raspi-config
39
+ Install required library:
40
+
41
+ pip install smbus2
42
+
43
+
44
+
45
+
46
+
47
+## ref
48
+
49
+- [[SDK-dat]]
... ...
\ No newline at end of file
SDK-dat/interface-SDK-dat/py-rpi-i2c-scan.py
... ...
@@ -0,0 +1,159 @@
1
+#!/usr/bin/env python3
2
+"""
3
+I2C Address Scanner for Raspberry Pi
4
+Scans all possible I2C addresses and reports which devices are found.
5
+Requires smbus2 library: pip install smbus2
6
+"""
7
+
8
+import smbus2
9
+import time
10
+import sys
11
+
12
+class I2CScanner:
13
+ def __init__(self, bus_number=1):
14
+ """
15
+ Initialize I2C scanner
16
+ Args:
17
+ bus_number: I2C bus number (1 for Raspberry Pi 3/4, 0 for older models)
18
+ """
19
+ self.bus_number = bus_number
20
+ try:
21
+ self.bus = smbus2.SMBus(bus_number)
22
+ print(f"I2C Scanner initialized on bus {bus_number}")
23
+ except Exception as e:
24
+ print(f"Error initializing I2C bus {bus_number}: {e}")
25
+ print("Make sure I2C is enabled: sudo raspi-config -> Interface Options -> I2C")
26
+ sys.exit(1)
27
+
28
+ def scan_address(self, address):
29
+ """
30
+ Check if device exists at given I2C address
31
+ Args:
32
+ address: I2C address to check (0x00 to 0x7F)
33
+ Returns:
34
+ True if device responds, False otherwise
35
+ """
36
+ try:
37
+ # Try to read a byte from the device
38
+ self.bus.read_byte(address)
39
+ return True
40
+ except:
41
+ return False
42
+
43
+ def scan_all_addresses(self):
44
+ """
45
+ Scan all possible I2C addresses (0x03 to 0x77)
46
+ Reserved addresses 0x00-0x02 and 0x78-0x7F are skipped
47
+ """
48
+ print("Scanning I2C bus for devices...")
49
+ print(" 0 1 2 3 4 5 6 7 8 9 a b c d e f")
50
+
51
+ found_devices = []
52
+
53
+ for row in range(0, 8):
54
+ print(f"{row}0: ", end="")
55
+
56
+ for col in range(0, 16):
57
+ address = row * 16 + col
58
+
59
+ # Skip reserved addresses
60
+ if address < 0x03 or address > 0x77:
61
+ print(" ", end="")
62
+ continue
63
+
64
+ if self.scan_address(address):
65
+ print(f"{address:02x} ", end="")
66
+ found_devices.append(address)
67
+ else:
68
+ print("-- ", end="")
69
+
70
+ print() # New line after each row
71
+
72
+ return found_devices
73
+
74
+ def get_device_info(self, address):
75
+ """
76
+ Get additional information about a device (if available)
77
+ Args:
78
+ address: I2C address of the device
79
+ """
80
+ known_devices = {
81
+ 0x48: "ADS1115/ADS1015 ADC or TMP102 Temperature Sensor",
82
+ 0x49: "ADS1115/ADS1015 ADC or TMP102 Temperature Sensor",
83
+ 0x4A: "ADS1115/ADS1015 ADC or TMP102 Temperature Sensor",
84
+ 0x4B: "ADS1115/ADS1015 ADC or TMP102 Temperature Sensor",
85
+ 0x68: "DS1307/DS3231 RTC or MPU6050 IMU",
86
+ 0x69: "MPU6050 IMU (alternate address)",
87
+ 0x76: "BMP280/BME280 Pressure/Humidity Sensor",
88
+ 0x77: "BMP280/BME280 Pressure/Humidity Sensor (alternate)",
89
+ 0x3C: "SSD1306 OLED Display (128x64)",
90
+ 0x3D: "SSD1306 OLED Display (128x32)",
91
+ 0x40: "PCA9685 PWM Driver",
92
+ 0x50: "AT24C32/64 EEPROM",
93
+ 0x51: "AT24C32/64 EEPROM",
94
+ 0x52: "AT24C32/64 EEPROM",
95
+ 0x53: "AT24C32/64 EEPROM",
96
+ 0x20: "PCF8574 I/O Expander",
97
+ 0x21: "PCF8574 I/O Expander",
98
+ 0x22: "PCF8574 I/O Expander",
99
+ 0x23: "PCF8574 I/O Expander",
100
+ 0x27: "PCF8574 I/O Expander (LCD Backpack)",
101
+ 0x38: "PCF8574A I/O Expander",
102
+ 0x39: "PCF8574A I/O Expander",
103
+ 0x3A: "PCF8574A I/O Expander",
104
+ 0x3B: "PCF8574A I/O Expander",
105
+ 0x3E: "PCF8574A I/O Expander",
106
+ 0x3F: "PCF8574A I/O Expander (LCD Backpack)",
107
+ }
108
+
109
+ return known_devices.get(address, "Unknown device")
110
+
111
+ def detailed_scan(self):
112
+ """
113
+ Perform detailed scan with device identification
114
+ """
115
+ found_devices = self.scan_all_addresses()
116
+
117
+ if found_devices:
118
+ print(f"\nFound {len(found_devices)} device(s):")
119
+ print("-" * 60)
120
+ for addr in found_devices:
121
+ device_info = self.get_device_info(addr)
122
+ print(f"Address: 0x{addr:02X} ({addr:3d}) - {device_info}")
123
+ else:
124
+ print("\nNo I2C devices found!")
125
+ print("Check your connections and make sure I2C is enabled.")
126
+
127
+ def __del__(self):
128
+ """Close I2C bus when object is destroyed"""
129
+ if hasattr(self, 'bus'):
130
+ self.bus.close()
131
+
132
+def main():
133
+ """Main function"""
134
+ print("=" * 60)
135
+ print("Raspberry Pi I2C Address Scanner")
136
+ print("=" * 60)
137
+
138
+ # Try to determine the correct bus number
139
+ try:
140
+ # For Raspberry Pi 3/4, use bus 1
141
+ scanner = I2CScanner(bus_number=1)
142
+ except:
143
+ try:
144
+ # For older Raspberry Pi models, try bus 0
145
+ print("Bus 1 failed, trying bus 0...")
146
+ scanner = I2CScanner(bus_number=0)
147
+ except Exception as e:
148
+ print(f"Failed to initialize I2C scanner: {e}")
149
+ return
150
+
151
+ # Perform the scan
152
+ scanner.detailed_scan()
153
+
154
+ print("\nScan complete!")
155
+ print("\nNote: Make sure I2C is enabled in raspi-config")
156
+ print("Install required library: pip install smbus2")
157
+
158
+if __name__ == "__main__":
159
+ main()
... ...
\ No newline at end of file
SDK-dat/python-dat/python-env-dat/python-env-dat.md
... ...
@@ -0,0 +1,20 @@
1
+
2
+# python-env-dat
3
+
4
+# 1. Go to your home directory
5
+
6
+ cd ~
7
+
8
+# 2. Make and enter a virtual environment
9
+
10
+ python3 -m venv test
11
+ source test/bin/activate
12
+
13
+# 3. Upgrade pip (recommended)
14
+
15
+ pip install --upgrade pip
16
+
17
+# 4. Install required luma libraries
18
+
19
+ pip install luma.oled
20
+
... ...
\ No newline at end of file
SDK-dat/python-dat/python-error-dat.md
... ...
@@ -1,6 +1,9 @@
1 1
2 2
# python-error-dat.md
3 3
4
+
5
+## error 1
6
+
4 7
root@raspberrypi:/home/pi# pip install Image
5 8
error: externally-managed-environment
6 9
... ...
@@ -20,11 +23,16 @@
20 23
hint: See PEP 668 for the detailed specification.
21 24
22 25
23
-how to solve
26
+### how to solve
24 27
28
+ pip3 install luma.oled --break-system-packages
29
+
25 30
pip3 install Pillow --break-system-packages
26 31
27 32
28 33
The error lgpio.error: 'GPIO not allocated' usually indicates an issue with accessing the GPIO pins on your Raspberry Pi. Here are the common solutions:
29 34
30
-**apt-get install python3-rpi.gpio**
... ...
\ No newline at end of file
0
+**apt-get install python3-rpi.gpio**
1
+
2
+
3
+
Tech-dat/Interface-dat/interface-dat.md
... ...
@@ -1,6 +1,8 @@
1 1
2 2
# interface dat
3 3
4
+- [[interface-SDK-dat]]
5
+
4 6
- [[peripherals-dat]]
5 7
6 8
- [[RS485-DAT]] - [[modbus-dat]]