Corrected the implementation of the transmit function. Interrupt that controlls the square wave will be turned on or off to transmit commands.