Files
raspberry_scripts/off.py
2025-07-24 20:41:20 +02:00

23 lines
393 B
Python
Executable File

#!/usr/bin/env python3
import RPi.GPIO as GPIO
# Configuraciones
LED_PIN = 16 # Número del pin BCM donde está conectado el LED
def main():
# Configuración del GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED_PIN, GPIO.OUT)
# Apagar el LED
GPIO.output(LED_PIN, GPIO.LOW)
# Liberar los recursos del GPIO
GPIO.cleanup()
if __name__ == "__main__":
main()