import time
from machine import Pin
# Small delay for USB serial to get ready
time.sleep(0.1)
print("Booting Raspberry Pi Pico W...")
# ---------------- Configuration ----------------
# Built-in LED (status indicator)
led = Pin("LED", Pin.OUT)
# External LED (optional)
led_ext = Pin(2, Pin.OUT)
# Simulated device identity
device_id = "PICO_W_001"
# Simulated system status
status = "SYSTEM_HEALTHY"
print(f"Initializing Telemetry for {device_id}...")
time.sleep(1)
print("System Started. Serial Telemetry Active.")
print("-" * 50)
# ---------------- Main Loop ----------------
while True:
# Toggle LEDs to show system is alive
led.toggle()
led_ext.toggle()
# Get uptime in seconds
timestamp_sec = time.ticks_ms() / 1000
# Create telemetry message (this is the "voice")
telemetry_log = (f"ID: {device_id} | time: {timestamp_sec:.1f}s | Status: {status}")
# Send telemetry via Serial (USB)
print(telemetry_log)
# Send telemetry every 1 second
time.sleep(1)