pico_epaper_42_v2.py: Change default pin to match hardware.

pull/80/head
Peter Hinch 2024-07-22 14:05:16 +01:00
rodzic b9506de37a
commit a6b19a8792
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -1390,7 +1390,10 @@ Two versions of this display exist. They require different drivers. The type of
a board may be distinguished as below, with the V2 board being the second
image:
![Image](images/V1_EPD.JPG)
V1 board.
![Image](images/V2_EPD.JPG)
V2 board.
There are two drivers for the V1 display:
1. `pico_epaper_42.py` 1-bit black/white driver supports partial updates.
@ -1413,6 +1416,11 @@ from drivers.epaper.pico_epaper_42_v2 import EPD as SSD # V2 driver
gc.collect() # Precaution before instantiating framebuf.
ssd = SSD() # Create a display instance based on a Pico in socket.
```
##### Frozen bytecode
In testing the V2 driver failed when implemented as frozen bytecode. It worked
when pre-compiled to a `.mpy` file. The reason for this is unclear.
### 5.3.1 Constructor args
For other hosts the pins need to be specified in `color_setup.py` via the

Wyświetl plik

@ -34,6 +34,7 @@
# Waveshare URLs
# Main page: https://www.waveshare.com/pico-epaper-4.2.htm
# Wiki: https://www.waveshare.com/wiki/Pico-ePaper-4.2
# Another wiki: https://www.waveshare.com/wiki/4.2inch_e-Paper_Module_Manual#Introduction
# Code: https://github.com/waveshareteam/Pico_ePaper_Code/blob/main/python/Pico-ePaper-4.2_V2.py
from machine import Pin, SPI
@ -58,7 +59,7 @@ _EPD_HEIGHT = const(300)
_RST_PIN = 12
# changed default to 7, as this can be confusing on pico -- pin 8 for SPI1 is the Rx, which overrides DC pin if miso is set to none
_DC_PIN = 7
_DC_PIN = 8
_CS_PIN = 9
_BUSY_PIN = 13