do you help me with a rasph or arduino loop to open and close a damper by timing relay operation?
I have to create an automatism. pressing a button will energize a 20 x relay. But then you have to turn it off otherwise I can not use the wall panel
20 x relay .what are you trying to do?
you can turn on/off relays with this code:
CAYENNE_IN(1)
{
int currentValue = getValue.asInt();
if (currentValue == 1)
{
//do whatever you want when button is on
digitalWrite(4, HIGH);
}
else
{
//do whatever yo want when button is off
digitalWrite(4, HIGH);
}
}
next on your dashboard go to
add new > devices/widgets > custom widget > button widget and fill all details with channel 1 as selected.
20 minutes of water on the lawn I have to give it … I need a timer your code just turns on and off