A transistor is an electronic switching device and is not the same as a transmitter!
I need to use radiometrix TX2-433-160-5V and RX2-433-160-5V to transmit the information. As for the program, can I know what do I have add in my current program to become transistor and make another file for receiver?
That depends on the wiring. Post schematics of the planned setup with the transmission modules.