Answer the question
In order to leave comments, you need to log in
How to make a tricky relay?
There is a button that is pressed N-th number of times, you need to make sure that the contacts close and open only once at the output. What relay can be used? Mains voltage 12 volts.
Answer the question
In order to leave comments, you need to log in
Implemented on carduino.
int val = 0;
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
if(digitalRead(10)==HIGH)
{
if(val==0){
digitalWrite(13,HIGH);//включаем светодио
delay(1000);
digitalWrite(13, LOW);
val++;
}
}
else
{
digitalWrite(13,LOW);//выключаем
}
}
The logic of the work is not fully understood.
If you need to press the button N times - the relay closes, opens. At what pressure did the relay close? How long should the relay be closed? Is the logic repeated for the next N clicks?
But for example:
1. Programmable relay PR110
Implement the logic you want.
2. Make on microcircuits of logical elements. Put them on a breadboard or printed circuit board.
3. Implement logic on Arduino.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question