You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We suppose able to program it under Arduino codes in private localhost or by any platform we want so i read the instructions on manufacture web site http://www.chinalctech.com/cpzx/Programmer/427.html
and is see {{" this Control command for relay(hex format):
Open relay 1:A0 01 01 A2
Close relay 1:A0 01 00 A1
Open relay 2:A0 02 01 A3
Close relay 2:A0 02 00 A2
Open relay 3:A0 03 01 A4
Close relay 3:A0 03 00 A3
Open relay 4:A0 04 01 A5
Close relay 4:A0 04 00 A4 "}}
so i traied this in serial codes but didn't work
if (getValue.asInt() == 0) {
Serial.write(A00100A1);
}
else {
Serial.write(A00100A2);
}
and i tried this but also didn't work
char mystr1o[33] ="10100000000000010000000110100010";//"¢"; //String data
char mystr1c[33] ="10100000000000010000000110100001"; //"،"; //String data
char mystr2c[33] ="10100000000000100000000010100010"; //"،"; //String data
char mystr2o[33] ="10100000000000100000000110100011"; //"،"; //String data
char mystr3c[33] ="10100000000000110000000010100011"; //"،"; //String data
char mystr3o[33] ="10100000000000110000000110100100"; //"،"; //String data
char mystr4c[33] ="10100000000001000000000010100100"; //"،"; //String data
char mystr4o[33] ="10100000000001000000000110100101"; //"،"; //String data
....
Serial.write(mystr1o,32); //Write the serial data
Serial.write(mystr1c,32);
Serial.write(mystr2c,32);
Serial.write(mystr2o,32);
to turn the switch 1 & 2 on / off
but also didn't work.
We suppose able to program it under Arduino codes in private localhost or by any platform we want so i read the instructions on manufacture web site http://www.chinalctech.com/cpzx/Programmer/427.html
and is see {{" this Control command for relay(hex format):
Open relay 1:A0 01 01 A2
Close relay 1:A0 01 00 A1
Open relay 2:A0 02 01 A3
Close relay 2:A0 02 00 A2
Open relay 3:A0 03 01 A4
Close relay 3:A0 03 00 A3
Open relay 4:A0 04 01 A5
Close relay 4:A0 04 00 A4 "}}
so i traied this in serial codes but didn't work
if (getValue.asInt() == 0) {
Serial.write(A00100A1);
}
else {
Serial.write(A00100A2);
}
and i tried this but also didn't work
char mystr1o[33] ="10100000000000010000000110100010";//"¢"; //String data
char mystr1c[33] ="10100000000000010000000110100001"; //"،"; //String data
char mystr2c[33] ="10100000000000100000000010100010"; //"،"; //String data
char mystr2o[33] ="10100000000000100000000110100011"; //"،"; //String data
char mystr3c[33] ="10100000000000110000000010100011"; //"،"; //String data
char mystr3o[33] ="10100000000000110000000110100100"; //"،"; //String data
char mystr4c[33] ="10100000000001000000000010100100"; //"،"; //String data
char mystr4o[33] ="10100000000001000000000110100101"; //"،"; //String data
....
Serial.write(mystr1o,32); //Write the serial data
Serial.write(mystr1c,32);
Serial.write(mystr2c,32);
Serial.write(mystr2o,32);
to turn the switch 1 & 2 on / off
but also didn't work.
what should i do? please?
i notes that i have a ic called nuvoton n76e003at20
https://direct.nuvoton.com/en/n76e003at20
5th_ESP01_4relay.zip
The text was updated successfully, but these errors were encountered: