am testing out a new 4 channel relay shield for UNO. was doing this a while back, the flash memory that had the projects got lost, but able to recover most of it from an old laptop.
Solved the question but just for the exercise thought its useful to look at: All that prints on the LCD is: rely1 ON or rely2 ON etc... it never says relyx off.
as soon as relyx off is sent? it sends the next relyx ON
void loop() {
digitalWrite(relay1, HIGH);
lcd.clear();
lcd.print("rely1 ON ");
delay(2000);
digitalWrite(relay1, LOW);
//lcd.clear();// lcd.print(" ");
lcd.print("rely1 off ");
digitalWrite(relay2, HIGH);
lcd.clear();//lcd.print(" ");
lcd.print("rely2 ON ");
delay(2000);
digitalWrite(relay2, LOW);
lcd.clear();// lcd.print(" ");
lcd.print("rely2 off ");
digitalWrite(relay3, HIGH);
lcd.clear();//lcd.print(" ");
lcd.print("rely3 ON ");
delay(2000);
digitalWrite(relay3, LOW);
lcd.clear();//lcd.print(" ");
lcd.print("rely3 off ");
digitalWrite(relay4, HIGH);
lcd.clear();// lcd.print(" ");
lcd.print("rely4 ON ");
delay(2000);
digitalWrite(relay4, LOW);
lcd.clear();// lcd.print(" ");
lcd.print("rely4 off ");
}
Is it offensive to you? would you prefer that I delete it completely? Should I ask you first before posting something would that be better? Just trying to understand.
The following could be something that you are directing the volunteers here to do. We offer help the best way we can.
“Solved the question but just for the exercise thought its useful to look at: All that prints on the LCD is: rely1 ON or rely2 ON etc... it never says relyx off.”
New users don’t usually request helpers do do something a certain way.
A new user is asked to follow the posting guide lines
I didnt ask for helpers to help. I thought that was in the text? that I said its SOLVED, that it was a mistake that may not be obvious at first glance. It was something that newer developers could think about perhaps.
But grouchy people who like to complain? will. If you suggest in any way shape or form that I violated any of the posting guidelines? Id appreciate you showing me how.
For trying to share an interesting, simple programming mistake, I get flamed.
The Introductory Tutorials section is for tutorials which means that at the end of it a reader will have a working code that does not exhibit undesired behaviour.
You state that you solved the problem so in this topic or in your opening post you should also provide the siolution to the problem.
Definitely could be better written esp. for non native English speakers. Make it clearer you faced an issue and then found why and post the way you solved it.