Easy! It’s giving you a wider pulse duration at the start to qualify the incoming data.
From there you only need to sample 32 times at the correct interval.
So look for that, then read it in with a 32 step loop.
Of course, better ways than reading into a 32 byte array, but quickest.Code:bitcode var byte[32] count var byte pulseduration var byte pulseduration = time from peak to peak for count = 0 to 31 bitcode[count] = inputpin pause pulseduration next count
Bookmarks