from base_aux.buses.serial_client import SerialClient
SerialClient.addresses_paired__detect()



exit()
from base_aux.buses import *
from typing import *


class Dev(SerialClient_FirstFree_Shorted):
    BAUDRATE: int = 115200
    EOL__SEND = b"\r\n"
    RAISE_CONNECT = False
    LOG_ENABLE = True

    REWRITEIF_READFAILDECODE = 5
    # TIMEOUT__READ: float = 3       # 0.2 is too short!!! dont touch! in case of reading char by char 0.5 is the best!!! 0.3 is not enough!!!

    # def address__validate(self) -> bool | None | NoReturn:
    #     for i in range(5):
    #         self._write('help')
    #         if self.read_line():
    #             break
    #         time.sleep(1)
    #     self.buffers_clear()


dev = Dev()
if dev.connect():
    # for i in range(10):
    #     if dev.write_read__last('stop'):
    #         break
    #     time.sleep(0.5)
    #     print()
    #     print()
    #     print()
    #     print()
    #     print()


    index = 0
    while True:
        index += 1
        load = f"step{index}"
        print(load)
        if not dev.write_read__last_validate(load, load):
            print(f"FAIL_FINAL[{load=}]")
