Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A relay is a part that acts like a switch that can be controlled by an Arduino. They usually are powered by sending current through a coil, which moves a piece of metal to touch a contact within it. (Note there are also solid state relays which act more like a transistor.) The moving parts is why some devices make a "clicking" noise when they turn on/off a light or another device attached to it.
0
votes
1
answer
129
views
How to set a timer for a function and be able to reset it in the middle of the process?
We have to make a LED turn on and of with a button and a relay. … const int relay = 6;
const int button = 5;
int stateold = 1;
int statenew = 0;
int LED = 0;
void setup()
{
pinMode(relay,OUTPUT);
pinMode(button,INPUT);
time = millis();
}
void loop() …