Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

info of the Arduino code #4

Open
AsemAuor opened this issue Jun 13, 2020 · 0 comments
Open

info of the Arduino code #4

AsemAuor opened this issue Jun 13, 2020 · 0 comments

Comments

@AsemAuor
Copy link

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

5V-ESP8266-ESP-01-4-Channel-Wifi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant