i dont know how to set signals input so i just put a terminal, actually it's an output from arduino pin.

this is not for building, just explain how it works.