Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retiredwizard/tdeck_repl
LILYGO T-Deck Virtual REPL
https://github.com/retiredwizard/tdeck_repl
circuitpython esp32-s3 lilygo lilygo-t-deck lilygo-tdeck st7789
Last synced: 2 months ago
JSON representation
LILYGO T-Deck Virtual REPL
- Host: GitHub
- URL: https://github.com/retiredwizard/tdeck_repl
- Owner: RetiredWizard
- Created: 2023-12-01T19:37:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-15T16:33:49.000Z (3 months ago)
- Last Synced: 2024-10-09T22:41:04.413Z (2 months ago)
- Topics: circuitpython, esp32-s3, lilygo, lilygo-t-deck, lilygo-tdeck, st7789
- Language: Python
- Homepage:
- Size: 161 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tdeck_repl
LILYGO T-Deck Virtual REPLPlacing code.py and tdeck_repl.py on the LilyGO [T-DECK](https://www.lilygo.cc/products/t-deck) will present a virtual REPL on the device keyboard when it boots. The trackball will function as an up/down/left/right arrow for accessing the command line history and edit functions.
To generate an equal sign (=) enter an underscore followed by a dash (_-) and to generate square brackets enter a parenthesis followed or proceeded by a plus sign ( [ = (+, ] = +) ).
Pressing the speaker key (just left of the enter key) will generate the dollar sign ($).Multi-key translation table:
_- -> =
(+ -> [
+) -> ]
(- -> <
-) -> >
_# -> ^
_/ -> \
-/ -> %
*To display the key translation table on the T-Deck, type "import keys" from the REPL prompt.*In order to enable T-Deck keyboard input in python scripts add the following block of code to the import section of your code:
```py
try:
from tdeck_repl import input
except:
pass
```
The Virtual REPL will treat a file named virtcode.py in the root directory ('/') the way the native REPL treats a code.py file, that is it will be executed within the Virtual REPL when the Microcontroller is powered up or reset. When the virtcode.py program exits the Virtual REPL will take over control.