I’ve made LEDs blink a few times so I’m at a lost to what’s wrong with my system. The idea is to blink the LED 10 times in 0.1 intervals, which I feel like I’ve done with the code below? It’s connected to an ultrasonic range sensor and it’s supposed to do the condition mentioned once the sensor reads less than 10cm, so far when it does the LED just seems to constantly be on rather than blink until a distance bigger than 10cm is dedicated. Silly question I know. Appreciate all help Also, before that function is called there is a normal traffic light mode where 3 different coloured LEDs are on seperately for 1 second.
for(int i = 0; i < 10; i++)