Just to expand on the subject line the sketch is to send an RF signal to an RF controlled relay.
I have used the code on a MEGA 2560, Leonardo and Pro Mini. Currently the code switches off the relay but I guess I could set a pin high for the code to decide if it should turn the relay off or on.
What I would like the Arduino to do is to be able to plug into a USB port on any device (Windows Laptop, Raspberry Pi, Linux server etc) and have the code run.
My main code for the host device would probably be written in Python. Is there any way of setting a pin high on an Arduino from the host machine so it could decide if the relay should be turned on or off (or to wait for the next on / off signal)?
I guess in Python I can create a function to check which operating system the host is running and then run different pieces of code. I don't know how to interface between the host and the Arduino to set a pin high or some other 'interrupt' for the Arduino to send the RF signal (on, off or wait).
Is this possible? If it is could you indicate the name of the routine / library etc required for Windows and Linux on the host machine.
I would prefer to use the cheapest Arduino possible but I did have 'power' problems with the 5V Pro Mini when I was testing it yesterday. I took a look at how the Pro Mini can be powered but the only way that worked was through the 'FTDI' i.e. vcc and gnd connected to my Mega. If I connected external power directly to RAW or VCC without the Mega it wouldn't send the RF signal (from RF transmitter on pin 2). I only provided 5V to RAW and the transmitter needs 3.3V to 5V but I was worried I might blow the Pro Mini if I gave it too much power. It appears RAW can take up to 12V. Will it be safe to provide 12V or is there some thing I am missing about powering the Pro Mini?