Test ANSI escape codes

This commit is contained in:
2026-03-26 17:33:24 +00:00
parent 092e635fd1
commit 8c40e111cd

10
main.py
View File

@@ -2,9 +2,17 @@ from pybricks.hubs import PrimeHub
from pybricks.parameters import Color from pybricks.parameters import Color
from pybricks.tools import wait from pybricks.tools import wait
import micropython import micropython
hub = PrimeHub() hub = PrimeHub()
hub.light.on(Color.RED) hub.light.on(Color.RED)
wait(100) wait(100)
print("Hello, World!") print("Hello, World!")
print("This is the spike prime hub.") print("This is the spike prime hub.")
print(micropython.mem_info()) #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~")