Added multi-file support
This commit is contained in:
29
project/main.py
Normal file
29
project/main.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from pybricks.hubs import PrimeHub
|
||||
from pybricks.parameters import Color
|
||||
from pybricks.tools import wait
|
||||
from imported import foo
|
||||
hub = PrimeHub()
|
||||
hub.light.on(Color.RED)
|
||||
wait(100)
|
||||
|
||||
print("Hello, World!")
|
||||
print("This is the spike prime hub.")
|
||||
#print(micropython.mem_info())
|
||||
|
||||
# Pynamics escape code test — event 99 (custom), name="hubReady", payload="spike-prime"
|
||||
print("\x1b[?PYN;99;hubReady;spike-prime~")
|
||||
|
||||
# Another test — event 6 (notify), level="info", message="Boot complete"
|
||||
print("\x1b[?PYN;6;info;Boot complete~")
|
||||
foo()
|
||||
while True:
|
||||
# This will stay here until you send a \n
|
||||
answer = input("Type something: ")
|
||||
|
||||
# This will now show up in your [stdout] log
|
||||
print("Hub received:", answer)
|
||||
|
||||
if answer == "stop":
|
||||
break
|
||||
|
||||
print("--- Program Ended ---")
|
||||
Reference in New Issue
Block a user