@@ -35,33 +35,102 @@ If your targeted is desktop / laptop, you can install the package like:
3535pip install git+https://github.com/trevorwslee/MicroPython-DumbDisplay
3636```
3737
38- If you would like to try out the development version (for desktop / laptop), you can install the development version like:
39- ```
40- pip install --upgrade --force-reinstall git+https://github.com/trevorwslee/MicroPython-DumbDisplay@develop
41- ```
38+ >
39+ > If you would like to try out the development version (for desktop / laptop), you can install the development version like:
40+ > ```
41+ > pip install --upgrade --force-reinstall git+https://github.com/trevorwslee/MicroPython-DumbDisplay@develop
42+ > ```
43+ >
44+ > To switch back after trying the development version, run
45+ > ```
46+ > pip install --upgrade --force-reinstall git+https://github.com/trevorwslee/MicroPython-DumbDisplay
47+ > ```
48+ >
4249
4350
4451# Getting Started
4552
46- The basic script setup is:
53+ The basic Python script setup is:
47541. import core, for creating `DumbDisplay` object
48- 2 . import IO mechanism, for creating IO object, like
49- - ` io4Inet ` (the default) -- Python networking support (not available for Micro-Python)
55+ <br>e.g.
56+ ```
57+ from dumbdisplay.core import *
58+ dd = DumbDisplay()
59+ ```
60+ - you can import the "core" components with ```from dumbdisplay.core import *```
61+ - or you can choose to import "all" components (including layers to be mentioned later) with ```from dumbdisplay.full import *```
62+ 2. import IO mechanism, for creating IO object [to pass to DumbDisplay object], like
63+ - `io4Inet` (the default) -- Python networking support (not available for Micro-Python)
5064 - `io4Wifi` -- Micro-Python WiFi support (for Raspberry Pi Pico W, ESP32, etc.)
51- 3 . import layers, for creating layer objects
52-
53- For example (using Python networking support with ` io4Inet ` as ` io ` )
65+ <br>e.g.
66+ ```
67+ from dumbdisplay.core import *
68+ from dumbdisplay.io_inet import *
69+ dd = DumbDisplay(io4Wifi("ssid", "password"))
70+ ```
71+ 3. import layers, for creating layer objects [passing DumbDisplay object to them]
72+ - `LayerLedGrid` -- a single LED, or a grid of multiple LEDs (**n** columns by **m** rows)
73+ <br>e.g.
74+ ```
75+ from dumbdisplay.core import *
76+ from dumbdisplay.layer_ledgrid import *
77+ dd = DumbDisplay()
78+ l = LayerLedGrid(dd)
79+ ```
80+ - `LayerLcd` -- a TEXT based LCD with configurable number of lines of configurable number of characters
81+ <br>e.g.
82+ ```
83+ from dumbdisplay.core import *
84+ from dumbdisplay.layer_lcd import *
85+ dd = DumbDisplay()
86+ l = LayerLcd(dd)
87+ ```
88+ - `LayerGraphical` -- a graphical LCD that you can draw to, with common drawing operations
89+ <br>e.g.
90+ ```
91+ from dumbdisplay.core import *
92+ from dumbdisplay.layer_graphical import *
93+ dd = DumbDisplay()
94+ l = LayerGraphical(dd)
95+ ```
96+ - `LayerSelection` -- a group / grid of TEXT based LCD mostly for showing selection choices
97+ <br>e.g.
98+ ```
99+ from dumbdisplay.core import *
100+ from dumbdisplay.layer_selection import *
101+ dd = DumbDisplay()
102+ l = LayerSelection(dd)
103+ ```
104+ - `Layer7SegmentRow` -- a single 7-segment digit, or a row of **n** 7-segments digits
105+ <br>e.g.
106+ ```
107+ from dumbdisplay.core import *
108+ from dumbdisplay.layer_7segrow import *
109+ dd = DumbDisplay()
110+ l = Layer7SegmentRow(dd)
111+ ```
112+ - `LayerPlotter` -- a "plotter"
113+ <br>e.g.
114+ ```
115+ from dumbdisplay.core import *
116+ from dumbdisplay.layer_plotter import *
117+ dd = DumbDisplay()
118+ l = LayerPlotter(dd)
119+ ```
120+
121+
122+ For example (using Python networking support with `io4Inet` as `io` for the DumbDisplay object)
54123```
55124from dumbdisplay.core import *
56125from dumbdisplay.io_inet import *
57126from dumbdisplay.layer_ledgrid import *
58- dd = DumbDisplay() # default io is io4Inet()
127+ dd = DumbDisplay(io4Inet()) # actually, default io is io4Inet()
59128l = LayerLedGrid(dd)
60129l.turnOn()
61130```
62131
63132
64- A simple sample that explicitly makes use of WiFi ` io4Wifi ` as ` io ` , can be like
133+ A simple sample that explicitly makes use of WiFi `io4Wifi` as `io` for the DumbDisplay object , can be like
65134```
66135from dumbdisplay.core import *
67136from dumbdisplay.io_wifi import *
0 commit comments