$> python3 12_solution.py 
[INFO] Initialising Arduino controller...
[INFO] Connected to Arduino firmware VERSION:1.3.0
[INFO] Configured Arduino input pin 2
[INFO] Connecting to UART target on /dev/ttyUSB0 at 1199 baud...
[INFO] UART connection established
[INFO] Starting PIN discovery (timing with no mid-send UART checks)
[INFO] Analysing position 1/8
[RESULT] Candidate '0' average LOW-delay: 0.00 ms
[RESULT] Candidate '1' average LOW-delay: 959.00 ms
[RESULT] Candidate '2' average LOW-delay: 972.00 ms
[RESULT] Candidate '3' average LOW-delay: 959.00 ms
[RESULT] Candidate '4' average LOW-delay: 962.00 ms
[RESULT] Candidate '5' average LOW-delay: 962.00 ms
[RESULT] Candidate '6' average LOW-delay: 962.00 ms
[RESULT] Candidate '7' average LOW-delay: 959.00 ms
[RESULT] Candidate '8' average LOW-delay: 961.00 ms
[RESULT] Candidate '9' average LOW-delay: 963.00 ms
[INFO] Position 1 selected: '2' (avg 972.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 2        │
    └───────────────────────────────┘

[INFO] Analysing position 2/8
[RESULT] Candidate '0' average LOW-delay: 0.00 ms
[RESULT] Candidate '1' average LOW-delay: 969.00 ms
[RESULT] Candidate '2' average LOW-delay: 973.00 ms
[RESULT] Candidate '3' average LOW-delay: 972.00 ms
[RESULT] Candidate '4' average LOW-delay: 971.00 ms
[RESULT] Candidate '5' average LOW-delay: 980.00 ms
[RESULT] Candidate '6' average LOW-delay: 971.00 ms
[RESULT] Candidate '7' average LOW-delay: 970.00 ms
[RESULT] Candidate '8' average LOW-delay: 973.00 ms
[RESULT] Candidate '9' average LOW-delay: 971.00 ms
[INFO] Position 2 selected: '5' (avg 980.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 25       │
    └───────────────────────────────┘

[INFO] Analysing position 3/8
[RESULT] Candidate '0' average LOW-delay: 0.00 ms
[RESULT] Candidate '1' average LOW-delay: 980.00 ms
[RESULT] Candidate '2' average LOW-delay: 981.00 ms
[RESULT] Candidate '3' average LOW-delay: 989.00 ms
[RESULT] Candidate '4' average LOW-delay: 981.00 ms
[RESULT] Candidate '5' average LOW-delay: 982.00 ms
[RESULT] Candidate '6' average LOW-delay: 981.00 ms
[RESULT] Candidate '7' average LOW-delay: 980.00 ms
[RESULT] Candidate '8' average LOW-delay: 979.00 ms
[RESULT] Candidate '9' average LOW-delay: 982.00 ms
[INFO] Position 3 selected: '3' (avg 989.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 253      │
    └───────────────────────────────┘

[INFO] Analysing position 4/8
[RESULT] Candidate '0' average LOW-delay: 990.00 ms
[RESULT] Candidate '1' average LOW-delay: 1002.00 ms
[RESULT] Candidate '2' average LOW-delay: 990.00 ms
[RESULT] Candidate '3' average LOW-delay: 992.00 ms
[RESULT] Candidate '4' average LOW-delay: 991.00 ms
[RESULT] Candidate '5' average LOW-delay: 991.00 ms
[RESULT] Candidate '6' average LOW-delay: 990.00 ms
[RESULT] Candidate '7' average LOW-delay: 992.00 ms
[RESULT] Candidate '8' average LOW-delay: 991.00 ms
[RESULT] Candidate '9' average LOW-delay: 991.00 ms
[INFO] Position 4 selected: '1' (avg 1002.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 2531     │
    └───────────────────────────────┘

[INFO] Analysing position 5/8
[RESULT] Candidate '0' average LOW-delay: 1000.00 ms
[RESULT] Candidate '1' average LOW-delay: 999.00 ms
[RESULT] Candidate '2' average LOW-delay: 1000.00 ms
[RESULT] Candidate '3' average LOW-delay: 1002.00 ms
[RESULT] Candidate '4' average LOW-delay: 1000.00 ms
[RESULT] Candidate '5' average LOW-delay: 1011.00 ms
[RESULT] Candidate '6' average LOW-delay: 1001.00 ms
[RESULT] Candidate '7' average LOW-delay: 1002.00 ms
[RESULT] Candidate '8' average LOW-delay: 1003.00 ms
[RESULT] Candidate '9' average LOW-delay: 1001.00 ms
[INFO] Position 5 selected: '5' (avg 1011.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 25315    │
    └───────────────────────────────┘

[INFO] Analysing position 6/8
[RESULT] Candidate '0' average LOW-delay: 1011.00 ms
[RESULT] Candidate '1' average LOW-delay: 1011.00 ms
[RESULT] Candidate '2' average LOW-delay: 1021.00 ms
[RESULT] Candidate '3' average LOW-delay: 1011.00 ms
[RESULT] Candidate '4' average LOW-delay: 1010.00 ms
[RESULT] Candidate '5' average LOW-delay: 1009.00 ms
[RESULT] Candidate '6' average LOW-delay: 1012.00 ms
[RESULT] Candidate '7' average LOW-delay: 1012.00 ms
[RESULT] Candidate '8' average LOW-delay: 1013.00 ms
[RESULT] Candidate '9' average LOW-delay: 1010.00 ms
[INFO] Position 6 selected: '2' (avg 1021.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 253152   │
    └───────────────────────────────┘

[INFO] Analysing position 7/8
[RESULT] Candidate '0' average LOW-delay: 1020.00 ms
[RESULT] Candidate '1' average LOW-delay: 1020.00 ms
[RESULT] Candidate '2' average LOW-delay: 1022.00 ms
[RESULT] Candidate '3' average LOW-delay: 0.00 ms
[RESULT] Candidate '4' average LOW-delay: 1022.00 ms
[RESULT] Candidate '5' average LOW-delay: 1021.00 ms
[RESULT] Candidate '6' average LOW-delay: 1019.00 ms
[RESULT] Candidate '7' average LOW-delay: 1023.00 ms
[RESULT] Candidate '8' average LOW-delay: 1022.00 ms
[RESULT] Candidate '9' average LOW-delay: 1032.00 ms
[INFO] Position 7 selected: '9' (avg 1032.00 ms)

    ┌───────────────────────────────┐
    │ Progress: 2531529  │
    └───────────────────────────────┘

[INFO] Analysing position 8/8
[RESULT] Candidate '0' average LOW-delay: 1031.00 ms
[RESULT] Candidate '1' average LOW-delay: 1032.00 ms
[RESULT] Candidate '2' average LOW-delay: 1032.00 ms
[RESULT] Candidate '3' average LOW-delay: 1030.00 ms
[SUCCESS] Device accepted code via UART: TS{D0n7_M355_w17h_t1m3} -> 25315294
[SUCCESS] Discovered PIN: 25315294
[INFO] Connections closed
