Can anybody tell me why this function dies out after about 20 minutes? It works fine, and then will freeze and turn off.
Hi @John_D , idex is probably overflowing to a negative number, which is returning a negative number when you use it in the modulus operation. Try making idex an unsigned integer?
Further to that, I’d be making everything unsigned.
@Chris_Parton Thank you! That did the trick!
@John_D No problem, glad I could help