Also, since the array elements are reset to zero at the top of the loop, you can simplify this...to this...Code:if (PULSE_LENGTH > 90) then RF.0(i) = 1 else rf.0(i) = 0 endifAnd, while errors are less likely with IR, you can detect them buy adding RF[2] and RF[3]. They should always sum to 255 or $FF.Code:if (PULSE_LENGTH > 90) then RF.0(i) = 1 endif
Bookmarks