I know I'm missing something very simple here. BUT it's been many years since I did any programming. I want to use a couple of limit switches and I just can't find the info. I need!!! I have a simple simulator program, a relay a motor and two slider switches to represent the limit switches. I hope I don't cause too many guffaws, but this is the code I'm trying to debug.
Help will be appreciated, ta muchly!
You cannot drive a relay directly from a Uno pin, well, assuming that is just a bare relay with no driver on board. You MUST disconnect the relay, you will damage the output with it like that, and possibly the whole processor.
Thanks for the info!!! The actual device is a relay board with an optocoupler and a separate 5 volt supply. It's the simulation which is causing me problems! But the pull up resistors did help greatly, many thanks again!!