'ir gag dim cmd,device dim x output 1 output 2 low 1 'Port 1 Gnd for IR module high 2 'Port 2 Vdd for IR module loop: irin 0,cmd,device if device = 0 then goto loop endif print cmd," ",device if cmd = 19 then gosub dovolup goto loop endif if cmd = 18 then gosub dovoldown goto loop endif goto loop '------------------------------- dovolup: longpause 250,20 '5 second pause for x = 1 to 40 irout 1,18 pause 50 next longpause 250,4 return dovoldown: longpause 250,20 '5 second pause for x = 1 to 40 irout 1,19 pause 50 next longpause 250,4 return