xerxes-nano-gpio-led-blink-python.py
Python script using RPi.GPIO to blink an LED, validating low-level GPIO access from the Jetson module via the Xerxes Nano carrier board.
Hardware: Xerxes Nano with Jetson Orin Nano Super, LED, and 330Ω resistor. Connect the LED to GPIO 17 (BCM) and ground. Ensure the power jumper is correctly positioned. Execution: pip install RPi.GPIO then python3 blink.py. Verify that the PWM fan does not block pin access if configured in shared mode.
xerxes-nano-gpio-led-blink-python.py
import time
import RPi.GPIO as GPIO
# La carte Xerxes Nano expose les GPIO du module Jetson Orin Nano Super
# Vérifiez le schéma KiCad pour la correspondance exacte des broches.
# Exemple : GPIO 17 (Pin 11 sur le connecteur standard Jetson)
LED_PIN = 17
def setup():
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED_PIN, GPIO.OUT)
print(f"GPIO {LED_PIN} configuré en sortie.")
def loop():
try:
while True:
GPIO.output(LED_PIN, GPIO.HIGH)
time.sleep(1)
GPIO.output(LED_PIN, GPIO.LOW)
time.sleep(1)
except KeyboardInterrupt:
pass
finally:
GPIO.cleanup()
print("GPIO nettoyé.")
if __name__ == "__main__":
setup()
loop()