Hello so i wrote function that should turn on and off two pins for 100 times with delay(500)x2, but instead it blinks for 10-25 times (sometimes longer sometimes shorter). Can someone tell me what I'm doing wrong? Using arduino leonardo.
The code below which is your blink() in a complete sketch, with your errors fixed and 500 reduced to 50 to save time, and a Serial.print(i), prints correctly up to 99.