NEW 1 READIR 2 IF A=0 1 3 A=F 4 B=8 5 IF A=B 1 6 B=9 7 IF A>B 1 8 A=A*2 9 A=A+20 10 GOTO A 20 RELAY1=1 21 GOTO 1 22 RELAY2=1 23 GOTO 1 24 RELAY3=1 25 GOTO 1 26 RELAY4=1 27 GOTO 1 28 RELAY5=1 29 GOTO 1 30 RELAY6=1 31 GOTO 1 32 RELAY7=1 33 GOTO 1 34 RELAY8=1 35 GOTO 1 38 RELAYS=0 39 GOTO 1 this line and the lines below are comments and can be removed with a text editor or the errors caused by trying to upload them can be ignored ------------------------------- irrelay1.tmb for the RC51-IR Waits for IR transmission from handheld remote control unit, turns relays on and off based only on Function code. relay 1 on = button 1, code 0 relay 2 on = button 2, code 1 relay 3 on = button 3, code 2 relay 4 on = button 4, code 3 relay 5 on = button 5, code 4 relay 6 on = button 6, code 5 relay 7 on = button 7, code 6 relay 8 on = button 8, code 7 relays off = button 0, code 9