Skip to content

Commit

Permalink
Add nethelper lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeongJun-Lee committed Mar 4, 2025
1 parent cf6a60c commit d4585ca
Show file tree
Hide file tree
Showing 7 changed files with 999 additions and 14 deletions.
2 changes: 1 addition & 1 deletion mu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__title__ = "mu-editor"
__description__ = "A simple Python editor for beginner programmers."

__version__ = "1.2.8"
__version__ = "1.2.9"

__license__ = "GPL3"
__url__ = "https://github.com/mu-editor/mu"
Expand Down
9 changes: 7 additions & 2 deletions mu/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"main_theme.mp3",
]
EXAMPLE_PGZ = [
"nethelper.py",
"flappybird.py",
"flappybird_neosoco.py",
"breakout.py",
Expand Down Expand Up @@ -971,6 +972,10 @@ def setup(self, modes):
if not os.path.exists(wd):
logger.debug("Creating directory: {}".format(wd))
os.makedirs(wd)
# Place nethelper Lib to root directory
shutil.copy(
path("nethelper.py", "pygamezero/"), os.path.join(wd, "nethelper.py")
)
images_path = os.path.join(wd, "images")
fonts_path = os.path.join(wd, "fonts")
sounds_path = os.path.join(wd, "sounds")
Expand All @@ -980,7 +985,7 @@ def setup(self, modes):
example_entry_b_path = os.path.join(wd, "examples/entry_basic/")
example_pgz_path = os.path.join(wd, "examples/pygame_zero/")
example_neopia_path = os.path.join(wd, "examples/neopia/")
example_pico_path = os.path.join(wd, "examples/pico/")
example_pico_path = os.path.join(wd, "examples/pico_basic/")
if not os.path.exists(images_path):
logger.debug("Creating directory: {}".format(images_path))
os.makedirs(images_path)
Expand Down Expand Up @@ -1095,7 +1100,7 @@ def setup(self, modes):
os.makedirs(example_pico_path)
for sfx in EXAMPLE_PICO_BASIC:
shutil.copy(
path(sfx, "pico_basic/"), os.path.join(example_pico_path, sfx)
path(sfx, "pico/"), os.path.join(example_pico_path, sfx)
)
# Ensure Web based assets are copied over.
template_path = os.path.join(wd, "templates")
Expand Down
2 changes: 1 addition & 1 deletion mu/resources/pico/bt_car.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from picozero import Robot
import bluetooth
from piconethelper import BLESimplePeripheral # Import BLESimplePeripheral from netzero
from piconethelper import BLESimplePeripheral

ble = bluetooth.BLE()
p = BLESimplePeripheral(ble) # Initialize Bluetooth
Expand Down
1 change: 0 additions & 1 deletion mu/resources/pico/wifi_car.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from picozero import Robot
from piconethelper import WifiSimplePeripheral
from machine import Pin, ADC


# Motor Pins
Expand Down
Loading

0 comments on commit d4585ca

Please sign in to comment.