Skip to content

Commit 788880c

Browse files
committed
Readme and keyboard help updates + temp LilyGo fix for hung display
1 parent 70d4df1 commit 788880c

File tree

6 files changed

+36
-11
lines changed

6 files changed

+36
-11
lines changed

PyDOS.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def PyDOS():
6767
global envVars
6868
if "envVars" not in globals().keys():
6969
envVars = {}
70-
_VER = "1.37"
70+
_VER = "1.38"
7171
prmpVals = ['>','(',')','&','|','\x1b','\b','<','=',' ',_VER,'\n','$','']
7272

7373
print("Starting Py-DOS...")
@@ -139,6 +139,7 @@ def exCmd(cFile,passedIn):
139139
exec(f"passedIn = '{passedIn}'\n{cf.read()}")
140140
except Exception as err:
141141
print_exception(err)
142+
envVars['lasterror'] = err
142143
except KeyboardInterrupt:
143144
print("^C")
144145

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,16 @@ CircuitPython LCD libraries from https://github.com/dhylands/python_lcd
183183

184184
**blink.py [led pin number]** - program to blink onboard LED
185185

186-
**rgbset.py [rgb led pin number]** - program to set the rgb color of an onboard neopixel or dotstar
187-
**rgbblink.py [rgb led pin number]** - program to blink an onboard neopixel or dotstar
188-
**rgbrainbow.py [rgb led pin number]** - program to color cycle an onboard neopixel or dotstar
186+
**rgbset.py [pin number,[size,[pixel]]]** - program to set the rgb color of an onboard neopixel or dotstar. The *size* and *pixel* arguments can be used to identify individual pixel in pixel array of more than 1 neopixel/dotstar.
189187

190-
**matrix.py** - program to initalize connected HUB75 RGB Matrix Panels as a CircuitPython display. The display object is stored as a PyDOS environment variable (_display)
188+
**rgbblink.py [pin number]** - program to blink an onboard neopixel or dotstar
189+
**rgbrainbow.py [pin number]** - program to color cycle an onboard neopixel or dotstar
190+
191+
**matrix.py [1|4]** - program to initalize connected HUB75 RGB Matrix Panels as a CircuitPython display. The display object is stored as a PyDOS environment variable (_display). If a 1 in passed as an argument, the matrix is configured as a single 64x32 panel, a 4 configures the matrix as a 2x2 matrix of 64x32 panels.
191192

192193
**reboot.py** - performs a soft reboot (Micropython requires a Ctrl-D to complete)
193194

194-
**keys.bat** - (Keyboard Featherwing/BBQ Keyboard only) Displays keyboard mappings for hidden keys and functions
195+
**keys.bat** - (Keyboard Featherwing/BBQ Keyboard/LilyGo T-Deck only) Displays keyboard mappings for hidden keys and functions
195196
**ui.bat [u/k]** - (Keyboard Featherwing/BBQ Keyboard only) Switches between using the Keyboard Featherwing and USB Serial port for PyDOS I/O
196197

197198
**fs.py [ro/rw]** - (Circuitpython only) By selecting the "RO" option the flash mode is set such that when the microcontroller

cpython/kbdFeatherWing/keys.bat

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
@echo off
2+
pexec import board
3+
pexec envVars["_boardID"] = board.board_id
4+
if not "%_boardID%" == "lilygo_tdeck" goto kbdFeatherWing
5+
echo .
6+
echo Entered Lilygo Keys Results
7+
echo ------------------- -------
8+
echo _- =
9+
echo (+ [
10+
echo +) ]
11+
echo (- <
12+
echo -) >
13+
echo _# ^
14+
echo _/ \
15+
echo -/ %%
16+
echo Speaker Key (left of enter) $
17+
echo .
18+
goto done
19+
20+
:kbdFeatherWing
221
echo Alt-$ (Speaker) returns an equal sign (=)
322
echo Hold a key for 2 seconds SHIFT or ALT
423
echo Alt-Enter will toggle between SHIFT and ALT
@@ -13,4 +32,6 @@ echo joystick up/down scrolls through entered lines
1332
echo The F3 key retrieves the last entered line
1433
echo F2 and then pressing a key will search
1534
echo the last entered line for that character
35+
36+
:done
1637
pause

cpython/lib/optional/pydos_ui_lilygokbd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def serial_bytes_available(self):
5656
with self._i2c as i2c:
5757
try:
5858
i2c.readinto(self._key)
59-
except:
59+
except Exception as err:
6060
self._key=bytearray(1)
6161
if self._key[0] != 0:
6262
retval = 1

matrix.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
if passedIn == '1':
1616
base_width = 64
1717
base_height = 32
18-
bit_depth = 1
18+
bit_depth = 2
1919
chain_across = 1
2020
tile_down = 1
2121
elif passedIn == '4':
2222
base_width = 64
2323
base_height = 32
24-
bit_depth = 1
24+
bit_depth = 2
2525
chain_across = 2
2626
tile_down = 2
2727
else:
@@ -34,9 +34,9 @@
3434
except:
3535
base_height = 32
3636
try:
37-
bit_depth = int(input('Bit Depth (1): '))
37+
bit_depth = int(input('Bit Depth (2): '))
3838
except:
39-
bit_depth = 1
39+
bit_depth = 2
4040
try:
4141
chain_across = int(input('Number of panels across (1): '))
4242
except:

setup.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ if not "%_boardID%" == "lilygo_tdeck" goto not_lilygo_tdeck
7676
rename /lib/pydos_ui.py /lib/pydos_ui_uart.py
7777
echo copy /cpython/lib/optional/pydos_ui_lilygokbd.py /lib/pydos_ui.py
7878
copy/y /cpython/lib/optional/pydos_ui_lilygokbd.py /lib/pydos_ui.py
79+
echo copy /cpython/kbdFeatherWing/keys.bat /keys.bat
80+
copy/y /cpython/kbdFeatherWing/keys.bat /keys.bat
7981
pexec f = open('/settings.toml','a')
8082
pexec f.write('\nPYDOS_DISPLAYIO_COLORSPACE="BGR565_SWAPPED"\n')
8183
pexec f.close()

0 commit comments

Comments
 (0)