Infrain2

mildenhall

New Member
I am designing a sound to light system using an 8M. I would like to use the IR remote to change the colour or light sequence. When I use INFRAIN2, the whole program waits for a key press. What I would like to do is have my lights flashing to the beat, and keep polling the IR port to see if a button has been pressed. If a button has not been pressed, then keep flashing the lights to the beat.

Does anyone have an idea how I could do this please? Thanks
 

mildenhall

New Member
I worked it out myself....

Code:
if pin3 = 0 then			' if a remote control button is being pressed
	setfreq m4
	infrain2			' read the button code
	setfreq m8
endif
 
Top