Got new project. Arduino nano with 4 output relay module attached and controlled by low voltage input...
Everything works as it should apart that after switching power off and back on got all relay outputs active after getting first signal from input program works fine by switching to correct relay. How to make so the nano remembers the last active output?
Got new project. Arduino nano with 4 output relay module attached and controlled by low voltage input...
Everything works as it should apart that after switching power off and back on got all relay outputs active after getting first signal from input program works fine by switching to correct relay. How to make so the nano remembers the last active output?
Thank you, Kes.
I think you are trying to say that when you turn your controller ON, all the relays become active, then start to behave as per your code.
I assume you would be happy if the controller started with all relays de-activated?
This is due to what relay assembly you are using and how you have written your setup code.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
I see that your second post is quite confusing. Now I doubt that I read the first one confidently, and suggest that you try to break down in more detail, exactly what it does now that you don't want to happen, what you want to happen, and supply the additional information requested in reply #4.
Setting a starting state that is constant, is a lot easier than using EEPROM. There is even a function for it, "setup()".