#!/usr/bin/env python3
"""Optional physical circuit only. BCM17/header11 -> 1k resistor -> LED -> GND.

Complete the guide's unpowered wiring review first. This is not the Linux
first-success prerequisite and has not been run on club hardware.
"""
import argparse

def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--wiring-reviewed", action="store_true")
    args = parser.parse_args()
    if not args.wiring_reviewed:
        parser.error("Review the conditional circuit before using --wiring-reviewed")
    from gpiozero import LED
    from gpiozero.pins.lgpio import LGPIOFactory
    factory = LGPIOFactory()
    try:
        with LED(17, pin_factory=factory) as led:
            led.blink(on_time=0.5, off_time=0.5, n=10, background=False)
    finally:
        factory.close()

if __name__ == "__main__":
    main()
