A little question to which I believe the main answer will be 20X2 and irin.
Is there a way to do a 'Timeout' for infrain2, I am using the 18x and have come to a stumbling block whereby I sometimes get stuck at infrain2 command, if the infra signal is lost, I know that the irin command has a timeout with it but I have got most of the coding done for the 18x and the 20x2's won't be here until early next year,( I know it's only a couple of days but it sounds longer).
A work around would be handy to prove or disprove some theories.
I am already counting the pulses and averaging them on input0 ( leg 17), to check that I am still receiving a signal.
Is there a way to do a 'Timeout' for infrain2, I am using the 18x and have come to a stumbling block whereby I sometimes get stuck at infrain2 command, if the infra signal is lost, I know that the irin command has a timeout with it but I have got most of the coding done for the 18x and the 20x2's won't be here until early next year,( I know it's only a couple of days but it sounds longer).
A work around would be handy to prove or disprove some theories.
I am already counting the pulses and averaging them on input0 ( leg 17), to check that I am still receiving a signal.
Code:
count 0, 2000, b0 'count pulses in 2 seconds
for counter = 1 to 10
w2 = w2 + b0 'take 10 samples and add together
next
b0 = w2 / 10 'divide result to get average into b0
pause 50
if b0 = 104 and b10 = 75 then run 'b10 is the saved IR 'code'
if b0 = 104 and pin2 = 0 then ask ' pin2 is the input button to accept
' the received code on LCD prompt
[code]
but I need to do infrain2 to refresh this if the IR stops.
All suggestions are welcome, anything is better than a wait for Jan 2010.
Regards.
Lez.