Above is the code I used in the Arduino IDE. Click the Download link to get the text file.
Python 5 volt remote relay.