Skip to content

Commit 8756d47

Browse files
committed
CircuitPython 9.x & MicroPython 1.22 support
1 parent 5a5d57a commit 8756d47

33 files changed

+276
-784
lines changed

PyDOS.py

Lines changed: 2 additions & 2 deletions
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.34"
70+
_VER = "1.35"
7171
prmpVals = ['>','(',')','&','|','\x1b','\b','<','=',' ',_VER,'\n','$','']
7272

7373
print("Starting Py-DOS...")
@@ -636,7 +636,7 @@ def readBATFile(BATfile):
636636
print(f'The current date is: {"MonTueWedThuFriSatSun"[i:i+3]} {localtime()[1]:02}/{localtime()[2]:02}/{localtime()[0]:04}')
637637

638638
elif cmd == "TIME":
639-
print(f"The current time is: {localtime()[3]:02}:{localtime()[4]:02}:{localtime()[5]:02}")
639+
print(f"The current time is: {localtime()[3]%12}:{localtime()[4]:02}:{localtime()[5]:02} {["AM","PM"][localtime()[3]//12]}")
640640

641641
elif cmd == "MEM":
642642
gc.collect()

bounce.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import time
2+
3+
try:
4+
from pydos_ui import Pydos_ui
5+
except:
6+
import select
7+
from sys import stdin
8+
Pydos_ui = None
9+
10+
x = 10; y = 10; d = 1; e = 1
11+
m='⬤'
12+
try:
13+
width = int(envVars.get('_scrWidth',80))
14+
height = int(envVars.get('_scrHeight',24))
15+
except:
16+
width=80
17+
height=24
18+
19+
# Add top, bottom and side borders with hashtags
20+
print(f'\033[2J\033[H{"█"*(max(0,(width-30))//2)}{" Bouncing Ball by DuckyPolice "[:width]}' +\
21+
f'{"█"*(max(0,width-30)-(max(0,(width-30))//2))}\033[2;0H',end="")
22+
for r in range(height-2):
23+
print('██' + ' '*(width-4) + '██')
24+
print(f'{"█"*(max(0,(width-17))//2)}{" Press Q to exit "[:width]}' +\
25+
f'{"█"*(max(0,width-17)-(max(0,(width-17))//2))}\033[2;0H',end="")
26+
27+
cmnd = ""
28+
while cmnd.upper() != 'Q':
29+
30+
if Pydos_ui:
31+
if Pydos_ui.serial_bytes_available():
32+
cmnd = Pydos_ui.read_keyboard(1)
33+
else:
34+
spoll = select.poll()
35+
spoll.register(stdin,select.POLLIN)
36+
37+
if spoll.poll(1):
38+
cmnd = stdin.read(1)
39+
40+
spoll.unregister(stdin)
41+
42+
43+
time.sleep(.05)
44+
x1=x;y1=y
45+
x+=d;y+=e
46+
if x%(width-5)<1:d=-d
47+
if y%(height-3)<1:e=-e
48+
print(f'\033[{y1+2};{x1+3}H \033[{y+2};{x+3}H{m}\033[{height-1};{width-2}H')
49+
50+
print("\n")

cpython/ESP32/autoexec.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pexec from supervisor import runtime
33
pexec envVars['_RunReason']=runtime.run_reason
44
rem -4 is timezone offset, default value -4 = Eastern Standard Time
55
if not %_RunReason% == supervisor.RunReason.STARTUP goto done
6-
ntpdate -4
6+
getdate
77
reboot
88

99
:done

cpython/ESP32/lib/adafruit_ntp.mpy

0 Bytes
Binary file not shown.
-1.95 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2.95 KB
Binary file not shown.

cpython/NanoConnect/lib/simpleio.mpy

10 Bytes
Binary file not shown.
-1.98 KB
Binary file not shown.
-634 Bytes
Binary file not shown.

cpython/cardputer/lib/m5stackcardputerkbd.py

Lines changed: 0 additions & 175 deletions
This file was deleted.

0 commit comments

Comments
 (0)