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.
2
votes
4
answers
7k
views
Multiple non-blocking countdown timers?
I'm building a control system for three sump pumps using a single Arduino and a set of relays. I have float sensors for each one, and need the Arduino to trigger the relays when the float sensors are …
0
votes
Multiple non-blocking countdown timers?
void readFloatSensor1()
{
if (digitalRead(floatSensorPin1) == LOW) // If the float sensor is tripped (pulled low)
{
pumpState1 = RELAY_ON; // then trigger the pump relay … pin
pumpTimerMillis3 = 0; // and reset the timer to 0 for the next trigger
}
}
//========
void triggerPumps()
{
// Toggle the pump relay pins on and off …