I think you already have a good starting point. The easier way is to use frameCount. You can use modulus to “cycle” the frame count, for example frameCount % 60 would return 0 to 59, and then repeats from 0. According to that value, change i from 1 to 2… I guess that’s enough to make it happen
Hi @MoonAlien822
That should totally work… when I test it here it works fine. One little tweak, perhaps you’re doing it for a reason, but why make the direction array of size 3?
It’s the “60” in frameCount%60. The frame count increases at the frame rate the sketch is set to, which by default is 60. The % operator gives you “the remains” of dividing the number by 60, which means that frameCount%60 will count from 0 to 59 every second. If you set it to a larger amount (120 would be two seconds), you’d increase the interval.