10-05-2022, 11:55 PM
(10-05-2022, 01:11 PM)admin Wrote: such as:
if(pcf8574_I1.digitalRead(P0) == LOW) //key1 pressed
{
delay(20); //anti-interference
if(pcf8574_I1.digitalRead(P0) == LOW) //key1 pressed again
{
pcf8574_R1.digitalWrite(P0,!pcf8574_R1.digitalRead(P0)); // toggle relay1 state
while(pcf8574_I1.digitalRead(P0) == LOW); //wait remove hand
if (pcf8574_R1.digitalRead(P0) == LOW) relay1state= "on"; else relay1state= "off";
}
}
//-------------------------------------------------------------------------------------------------------
you just change every key funtion's "delay(20);" replace 20 with other number will have different time.
i cant connect to the board all the picures from your colleague i need to do it from the whatsapp chat are gone, what is the most simple way to setup up this board, i just want to be able to choose what the inputs and outputs do and it to connect to alexa, im happy to use wifi and any app, if you can tell me your video for this or instructions, thanks