12-15-2022, 12:46 PM
so you save the keycode of your remote, then replace the keycode on your codes about if (keycode== xxxxxxx)
if (keycode==1376533) {Serial1.print("RELAY-KEY-255,1,1");delay(500);} //toggle relay1
if (keycode==1376532) {Serial1.print("RELAY-KEY-255,2,1");delay(500);} //toggle relay2
if (keycode==16405) {Serial1.print("RELAY-KEY-255,3,1");delay(500);} //toggle relay3
if (keycode==16404) {Serial1.print("RELAY-KEY-255,4,1");delay(500);} //toggle relay4
if (keycode==4117) {Serial1.print("RELAY-KEY-255,5,1");delay(500);} //toggle relay5
if (keycode==5723139) {Serial1.print("RELAY-KEY-255,6,1");delay(500);} //toggle relay6
if (keycode==20501) {Serial1.print("RELAY-KEY-255,7,1");delay(500);} //toggle relay7
if (keycode==20500) {Serial1.print("RELAY-KEY-255,8,1");delay(500);} //toggle relay8
if (keycode==5576131) {Serial1.print("RELAY-KEY-255,9,1");delay(500);} //toggle relay9
if (keycode==5575951) {Serial1.print("RELAY-KEY-255,10,1");delay(500);} //toggle relay10
if (keycode==5576188) {Serial1.print("RELAY-KEY-255,11,1");delay(500);} //toggle relay11
if (keycode==5576179) {Serial1.print("RELAY-KEY-255,12,1");delay(500);} //toggle relay12
if (keycode==5576191) {Serial1.print("RELAY-KEY-255,13,1");delay(500);} //toggle relay13
if (keycode==5576128) {Serial1.print("RELAY-KEY-255,14,1");delay(500);} //toggle relay14
if (keycode==5575987) {Serial1.print("RELAY-KEY-255,15,1");delay(500);} //toggle relay15
if (keycode==5575936) {Serial1.print("RELAY-KEY-255,16,1");delay(500);} //toggle relay16
if (keycode==1376533) {Serial1.print("RELAY-KEY-255,1,1");delay(500);} //toggle relay1
if (keycode==1376532) {Serial1.print("RELAY-KEY-255,2,1");delay(500);} //toggle relay2
if (keycode==16405) {Serial1.print("RELAY-KEY-255,3,1");delay(500);} //toggle relay3
if (keycode==16404) {Serial1.print("RELAY-KEY-255,4,1");delay(500);} //toggle relay4
if (keycode==4117) {Serial1.print("RELAY-KEY-255,5,1");delay(500);} //toggle relay5
if (keycode==5723139) {Serial1.print("RELAY-KEY-255,6,1");delay(500);} //toggle relay6
if (keycode==20501) {Serial1.print("RELAY-KEY-255,7,1");delay(500);} //toggle relay7
if (keycode==20500) {Serial1.print("RELAY-KEY-255,8,1");delay(500);} //toggle relay8
if (keycode==5576131) {Serial1.print("RELAY-KEY-255,9,1");delay(500);} //toggle relay9
if (keycode==5575951) {Serial1.print("RELAY-KEY-255,10,1");delay(500);} //toggle relay10
if (keycode==5576188) {Serial1.print("RELAY-KEY-255,11,1");delay(500);} //toggle relay11
if (keycode==5576179) {Serial1.print("RELAY-KEY-255,12,1");delay(500);} //toggle relay12
if (keycode==5576191) {Serial1.print("RELAY-KEY-255,13,1");delay(500);} //toggle relay13
if (keycode==5576128) {Serial1.print("RELAY-KEY-255,14,1");delay(500);} //toggle relay14
if (keycode==5575987) {Serial1.print("RELAY-KEY-255,15,1");delay(500);} //toggle relay15
if (keycode==5575936) {Serial1.print("RELAY-KEY-255,16,1");delay(500);} //toggle relay16