Skip to content

Commit 4fa6249

Browse files
Added credit and cleaned up README
1 parent 346cda0 commit 4fa6249

File tree

2 files changed

+23
-32
lines changed

2 files changed

+23
-32
lines changed

OLED/oledV2.py

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Credit to @AmazonShopper (https://www.amazon.com/gp/profile/amzn1.account.AH6T6UZJDFOPJJFIU7NEEZSCIVKA/)
2+
# Source Code Updates (https://www.amazon.com/gp/customer-reviews/R2X09M6QTQ2GJC)
3+
14
import time
25
import board
36
import busio
@@ -51,31 +54,8 @@
5154
draw.text((x, top+16), "{}".format(mem.decode('utf-8')), font=font, fill=255)
5255
draw.text((x, top+24), "{}".format(temp.decode('utf-8')), font=font, fill=255)
5356

57+
# Display image
5458
oled.image(image)
55-
#oled.display()
5659
oled.show()
57-
time.sleep(3)
58-
59-
60-
61-
62-
63-
64-
65-
66-
67-
68-
69-
70-
71-
72-
73-
74-
75-
76-
77-
78-
79-
80-
8160

61+
time.sleep(3)

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# 52Pi EP-0152 Raspberry Pi Fan Expansion Board / GeeekPi Fan Hat - **UPDATED for RPi 5**
1+
# 52Pi EP-0152 Raspberry Pi Fan Expansion Board - _UPDATED for Raspberry Pi 5_
22

3-
Updated source code for the [52Pi EP-0152 Raspberry Pi Fan Expansion Board](https://52pi.com/products/raspberry-pi-cooling-fan-expansion-board-plus-0-91-oled-v1-0-compatible-for-raspberry-pi-4b-3b-3b-2b), sold on Amazon as [GeeekPi Fan Hat](https://a.co/d/0fnQFZCU). The [original code](https://wiki.52pi.com/index.php?title=EP-0152) listed for the fan hat is woefully out of date. The code in this repository is compatible with the following revisions and Bookworm:
3+
Updated source code for the [52Pi EP-0152 Raspberry Pi Fan Expansion Board](https://52pi.com/products/raspberry-pi-cooling-fan-expansion-board-plus-0-91-oled-v1-0-compatible-for-raspberry-pi-4b-3b-3b-2b), sold on Amazon as [GeeekPi Fan Hat for Raspberry Pi 4 Model B, PWM Fan GPIO Expansion Board with 0.91inch OLED Display for Raspberry Pi 4B/3B+/3B/2B](https://a.co/d/0fnQFZCU).
4+
5+
The [original code](https://wiki.52pi.com/index.php?title=EP-0152) listed for the fan hat is woefully out of date, as it won't work for the Raspberry Pi 5 and doesn't use the [PEP 668 specification](https://peps.python.org/pep-0668/), which is now [required for Rasberry Pi OS](http://rptl.io/venv).
6+
7+
This repository is compatible with the following Raspberry Pi versions on [Raspberry Pi OS (64-bit) / Debian GNU/Linux 12 (bookworm)](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit):
48

59
- Raspberry Pi 5B ( :white_check_mark: - Tested)
610
- Raspberry Pi 4B ( :white_check_mark: - Tested)
@@ -34,17 +38,22 @@ Updated source code for the [52Pi EP-0152 Raspberry Pi Fan Expansion Board](http
3438
pip3 install rpi-lgpio
3539
```
3640

37-
3. Exit `sudo`:
41+
3. Remember to exit from `sudo -i`:
3842

3943
```bash
4044
exit
4145
```
4246

4347
## Fan Control
4448

45-
I've added [@franganghi](https://github.com/franganghi)'s version of [Raspberry-Pi5-PWM-Fan-Control](https://github.com/franganghi/Raspberry-Pi5-PWM-Fan-Control) as a submodule to this repository.
49+
I've added [@franganghi](https://github.com/franganghi)'s version of [Raspberry-Pi5-PWM-Fan-Control](https://github.com/franganghi/Raspberry-Pi5-PWM-Fan-Control) as a submodule to this repository. To pull the submodule after cloning this repository, run:
50+
51+
```bash
52+
cd EP-0152
53+
git submodule update --init --recursive
54+
```
4655

47-
- Follow the instructions listed in the [README](https://github.com/franganghi/Raspberry-Pi5-PWM-Fan-Control/tree/master?tab=readme-ov-file#raspberry-pi5-pwm-fan-control) to install [as a Linux service](https://github.com/franganghi/Raspberry-Pi5-PWM-Fan-Control/tree/master?tab=readme-ov-file#as-a-service).
56+
After doing so, follow the instructions listed in the [README](https://github.com/franganghi/Raspberry-Pi5-PWM-Fan-Control/tree/master?tab=readme-ov-file#raspberry-pi5-pwm-fan-control) to install [as a Linux service](https://github.com/franganghi/Raspberry-Pi5-PWM-Fan-Control/tree/master?tab=readme-ov-file#as-a-service).
4857

4958
## PWM LEDs
5059

@@ -76,7 +85,7 @@ $ sudo systemctl status ep0152ledpwm.service
7685
├─2701 /bin/bash /opt/EP-0152/LEDs/LEDsV2.sh
7786
└─2710 python3 /opt/EP-0152/LEDs/LEDsV2.py
7887
79-
Jun 21 10:34:34 ussyukon systemd[1]: Started ep0152ledpwm.service - EP-0152 LEDs PWM Pulse.
88+
Jun 21 10:34:34 host systemd[1]: Started ep0152ledpwm.service - EP-0152 LEDs PWM Pulse.
8089
```
8190

8291
### LEDs Uninstallation
@@ -91,6 +100,8 @@ sudo rm -rf /opt/EP-0152/LEDs
91100

92101
## OLED Screen
93102

103+
Credit to [@AmazonShopper](https://www.amazon.com/gp/profile/amzn1.account.AH6T6UZJDFOPJJFIU7NEEZSCIVKA/) for [providing the edits](https://www.amazon.com/gp/customer-reviews/R2X09M6QTQ2GJC) to the original code.
104+
94105
### OLED Installation
95106

96107
```bash
@@ -120,7 +131,7 @@ $ sudo systemctl status ep0152oled.service
120131
├─2703 /bin/bash /opt/EP-0152/OLED/OLED.sh
121132
└─2711 python3 /opt/EP-0152/OLED/oledV2.py
122133
123-
Jun 21 10:34:34 ussyukon systemd[1]: Started ep0152oled.service - EP-0152 OLED Monitor.
134+
Jun 21 10:34:34 host systemd[1]: Started ep0152oled.service - EP-0152 OLED Monitor.
124135
```
125136

126137
### OLED Uninstallation

0 commit comments

Comments
 (0)