Hi everyone,
I'm totally a newbie in programming so I would really appreciate it if you guys could give me a code for controlling the 8 channel relay shield using debounce buttons as shown in the arduino debounce example, I've already tested it to toggle 1 relay and it works but I keep getting errors in the codes I came up with for the 8 relays every time I tried to toggle them due to my lack of knowledge in programming.
Thanks.
Welcome to the Forum. We don't usually write code for people here, but if you post yours, we may be able to help. Please read the two posts at the top of this Forum by Nick Gammon on guidelines for posting here, especially the use of code tags which make the code looklike this
when posting source code files. Also, before posting the code, use Ctrl-T in the IDE to reformat the code in a standard format, which makes it easier for us to read.
Victarionz:
I would really appreciate it if you guys could give me a code for controlling the 8 channel relay shield using debounce buttons
This isn't nearly as specific a question as you might think. What relay shield? What does "control" mean?
Try these steps.
First, write a sketch that activates and releases one of your relays once a second.
Then, rewrite that sketch so that it does not use the delay() function. See the "blink without delay" example that comes with the arduino IDE.
Then, write a sketch that activates and releases all 8 of your relays, one each second.
At that point, you will have a decent idea how to use your relay shield and how to write an event handling loop that doesn't use delays to do things.
Then look at reading a button with debounce (Why not use my handy library? It's awesome!).
Then work out what "controlling" is supposed to mean. What do you actually want your buttons and relays to do?
And then you should be able to write your sketch.