Files
pynamics-ide/main.py

18 lines
520 B
Python
Raw Permalink Normal View History

2026-03-12 16:40:50 -05:00
from pybricks.hubs import PrimeHub
from pybricks.parameters import Color
2026-03-21 12:44:27 -05:00
from pybricks.tools import wait
2026-03-21 16:34:44 -05:00
import micropython
2026-03-26 17:33:24 +00:00
2026-03-12 16:40:50 -05:00
hub = PrimeHub()
2026-03-21 16:34:44 -05:00
hub.light.on(Color.RED)
wait(100)
2026-03-26 17:33:24 +00:00
2026-03-21 16:34:44 -05:00
print("Hello, World!")
print("This is the spike prime hub.")
2026-03-26 17:33:24 +00:00
#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~")