Improvements to docs.

pull/34/head
Peter Hinch 2022-05-10 16:52:40 +01:00
rodzic 6376ad8618
commit 7468cff4cb
3 zmienionych plików z 45 dodań i 29 usunięć

Wyświetl plik

@ -41,7 +41,14 @@ I2C or SPI interfaces. An example is [Adafruit 938][4m].
Nokia 5110 (PCD8544) displays. [This driver](https://github.com/mcauser/micropython-pcd8544.git) Nokia 5110 (PCD8544) displays. [This driver](https://github.com/mcauser/micropython-pcd8544.git)
is compatible. is compatible.
# Untested displays ## Adafruit displays
See [these notes](./ADAFRUIT.md) for wiring details, pin names and hardware
issues.
# Unlisted displays
## Displays whose controller is listed above
An untested display that uses a supported controller is not guaranteed to work. An untested display that uses a supported controller is not guaranteed to work.
This is because a controller can be connected to the display in a variety of This is because a controller can be connected to the display in a variety of
@ -49,6 +56,14 @@ ways. In some cases the existing driver can be persuaded to work, sometimes by
using nonstandard constructor arguments. In other cases the driver itself needs using nonstandard constructor arguments. In other cases the driver itself needs
to be adapted. to be adapted.
## Other controllers
For an unlisted controller the first step is to see if there is an existing
driver that can be ported. Adafruit publish CircuitPython drivers for their
hardware: these are easy to port to MicroPython. Only a minimal subset is
needed to support these GUI's, with the result that the drivers can be very
simple. See [this doc](./DRIVERS.md#7-writing-device-drivers) for details.
[1d]: https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#22-drivers-for-ssd1331 [1d]: https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#22-drivers-for-ssd1331
[2d]: https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#21-drivers-for-ssd1351 [2d]: https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#21-drivers-for-ssd1351
[3d]: https://github.com/micropython/micropython/blob/master/drivers/display/ssd1306.py [3d]: https://github.com/micropython/micropython/blob/master/drivers/display/ssd1306.py

Wyświetl plik

@ -791,7 +791,7 @@ SPI 2 and an arbitrary choice of GPIO. All may be changed and soft SPI may be
used. used.
| Pyb | Breakout | | Pyb | Breakout |
|:---:|:---------:| |:----|:----------|
| Vin | Vin (1) | | Vin | Vin (1) |
| Gnd | Gnd (3) | | Gnd | Gnd (3) |
| Y8 | MOSI (6) | | Y8 | MOSI (6) |
@ -853,7 +853,7 @@ on the underside of the board with the SD card at the top. Each connector has
pairs of pins which are linked together. pairs of pins which are linked together.
| Pin | Pyb | Pin | Pyb | Notes | | Pin | Pyb | Pin | Pyb | Notes |
|:-----:|:----:|:-----:|:----:|:---------------------------------:| |:------|:-----|:----- |:-----|:----------------------------------|
| RST | Y3 | | | Should be open drain (see below). | | RST | Y3 | | | Should be open drain (see below). |
| 3V | 3.3V | | | | | 3V | 3.3V | | | |
| . | | | | | | . | | | | |
@ -965,7 +965,7 @@ Connections may be adapted for other MicroPython targets. The board may be
powered from 5V or 3.3V: there is a regulator on board. powered from 5V or 3.3V: there is a regulator on board.
| Pyb | | L | R | | Pyb | | Pyb | | L | R | | Pyb |
|:---:|:----:|:--:|:--:|:----:|:---:| |:----|:-----|:--:|:--:|:-----|:----|
| Vin | VIN | 2 | 1 | | | | Vin | VIN | 2 | 1 | | |
| | | 4 | 3 | | | | | | 4 | 3 | | |
| | | 6 | 5 | | | | | | 6 | 5 | | |
@ -1160,7 +1160,8 @@ render glyphs instead of Python code.
The following script is useful for testing color display drivers after The following script is useful for testing color display drivers after
configuring `color_setup.py`. It draws squares at the extreme corners of the configuring `color_setup.py`. It draws squares at the extreme corners of the
display and a corner to corner diagonal. display and a corner to corner diagonal. The nature of this image makes
faultfinding much simpler than viewing a garbled GUI screen.
```python ```python
from color_setup import ssd # Create a display instance from color_setup import ssd # Create a display instance
from gui.core.colors import RED, BLUE, GREEN from gui.core.colors import RED, BLUE, GREEN
@ -1174,5 +1175,9 @@ ssd.rect(0, 0, 15, 15, RED) # Red square at top left
ssd.rect(ssd.width -15, ssd.height -15, 15, 15, BLUE) # Blue square at bottom right ssd.rect(ssd.width -15, ssd.height -15, 15, 15, BLUE) # Blue square at bottom right
ssd.show() ssd.show()
``` ```
If this produces correct output the GUI's can be expected to work.
Authors of device drivers are encouraged to raise an issue or PR so that the
library can be extended.
###### [Contents](./DRIVERS.md#contents) ###### [Contents](./DRIVERS.md#contents)

Wyświetl plik

@ -7,7 +7,8 @@ small color and monochrome OLED's, color TFT's, ePaper and Sharp units.
The `nano-gui` library is display-only. A library supporting user input is The `nano-gui` library is display-only. A library supporting user input is
[micro-gui](https://github.com/peterhinch/micropython-micro-gui); this comes at [micro-gui](https://github.com/peterhinch/micropython-micro-gui); this comes at
a cost of a substantially greater RAM requirement. a cost of a substantially greater RAM requirement. It supports all displays
available to nano-gui.
These images, most from OLED displays, fail to reproduce the quality of these These images, most from OLED displays, fail to reproduce the quality of these
displays. OLEDs are visually impressive displays with bright colors, wide displays. OLEDs are visually impressive displays with bright colors, wide
@ -40,9 +41,6 @@ wrap or clipping.
![Image](images/seismo.JPG) A mockup of a seismograph screen on an ePaper ![Image](images/seismo.JPG) A mockup of a seismograph screen on an ePaper
display. display.
Notes on [Adafruit and other OLED displays](./ADAFRUIT.md) including
wiring details, pin names and hardware issues.
# Contents # Contents
1. [Introduction](./README.md#1-introduction) 1. [Introduction](./README.md#1-introduction)
@ -74,15 +72,17 @@ wiring details, pin names and hardware issues.
minimising the RAM and flash footprints of the GUI. minimising the RAM and flash footprints of the GUI.
5. [Old firmware](./README.md#5-old-firmware) For users of color displays who can't run current firmware. 5. [Old firmware](./README.md#5-old-firmware) For users of color displays who can't run current firmware.
#### [Graph plotting module.](./FPLOT.md) #### [Supported displays](./DISPLAYS.md)
#### [Device driver document.](./DRIVERS.md) #### [Device driver document.](./DRIVERS.md)
#### [Graph plotting module.](./FPLOT.md)
# 1. Introduction # 1. Introduction
This library provides a limited set of GUI objects (widgets) for displays whose This library provides a limited set of GUI objects (widgets) for displays whose
display driver is subclassed from the `FrameBuffer` class. Such drivers can be display driver is subclassed from the `FrameBuffer` class. The drivers can have
tiny as the graphics primitives are supplied by the `FrameBuffer` class. minimal code as graphics primitives are supplied by the `FrameBuffer` class.
Compatible and tested displays are detailed [here](./DISPLAYS.md). The Compatible and tested displays are detailed [here](./DISPLAYS.md). The
[device driver doc](./DRIVERS.md) provides guidance on selecting the right [device driver doc](./DRIVERS.md) provides guidance on selecting the right
@ -107,10 +107,6 @@ displays:
* [RA8875 large displays](https://github.com/peterhinch/micropython_ra8875) * [RA8875 large displays](https://github.com/peterhinch/micropython_ra8875)
* [SSD1963 large displays](https://github.com/peterhinch/micropython-tft-gui) * [SSD1963 large displays](https://github.com/peterhinch/micropython-tft-gui)
Input via pushbuttons or an encoder is offered by
[micro-gui](https://github.com/peterhinch/micropython-micro-gui). This supports
all displays supported by nano-gui.
For historical reasons and to ensure consistency, code and documentation for For historical reasons and to ensure consistency, code and documentation for
my GUI's employ the American spelling of `color`. my GUI's employ the American spelling of `color`.