Hi, so I’m an electrician by trade and have been asked to help a uni student put together this project. Essentially the goal is to use six button to control the 6 solenoids on a time delay so essentially you can spell a letter in Braille and the person opposite reads the letter then it resets and so on.....
now after that lengthy introduction I have a 12v relay board with 8 relays and 8xinputs I have wired the inputs to correspond 8-13 on my uno board and essentially wish to have the push buttons on 1-6......I understand that the idea is to play and have fun with this technology unfortunately I am out of my depth with little time to learn a new programming code, so if anyone has some hints tips or script to help with this tricky project please let me know
Do you know how to read a button already? If not, start there - examples are in the IDE.
Next, make sure you can control one relay (and solenoid).
Then, combine the two: button press controls relay.
Finally, go fancy: timing, patterns, whatever you want.
hello!
firstly look here for pushbuttons.
second look here for delays.
you might also need interupts, so see this here.
finally, you need to control the relays. look here for a great relay tutorial.
for a simple "relay on, relay off" code, here you go:
// Arduino Relay Control Code
#define relay A0
#define interval 1000
void setup() {
pinMode(relay, OUTPUT);
}
void loop()
{
digitalWrite(relay, HIGH);
delay(interval);
digitalWrite(relay, LOW);
delay(interval);
}
in setup, you have to define whether the pin is an input or output.
digital write high sets the relay on, and low sets it off.
the #define defines the pins and the interval. not needed, but is very good coding practice to-do it this way. it makes it more flexible and easier to understand.
also do what @wvmarle said. since your new, code in steps. first get one working good, and go from there.
hope this is helpful!
super7800:
you might also need interupts, so see this here.
Quite positively not, and not in the least because OP is a beginner.
@ larry2019
Nice user name !
Show us your proposed schematic.
Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components.
Posting images:
https://forum.arduino.cc/index.php?topic=519037.0