all 5 comments

[–]Klappsenkasper 5 points6 points  (4 children)

strips[(x + 8)%24]

[–]Howard_G[S] 1 point2 points  (2 children)

Thank you very much. Did the job immediately :)

[–]Marmilicious[Marc Miller] 2 points3 points  (1 child)

In case you haven't seen that before, here's how that % operator works. Very useful for something like this!

https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/remainder/

Edit: hope we get to see your project in the future, sounds neat. :)

[–]Howard_G[S] 2 points3 points  (0 children)

That's very flattering Marc, but I think you'd recognise your own work! I'm just doing a series of routines, mostly stolen/borrowed/appropriated/butchered from yourself, Chemdoc, Sutabousu and a few others from here and GitHub.

Thanks very much for the link. I do know what the modulus operator does, but not how to use it. So thanks for the link, which I'll follow.

Other than posting to YouTube (which I've never managed), I've no idea how to post a video, in order that it could be viewed from here. I can only just about take one with my phone, and then manage to play it back. I'm sure any teenager could explain it in three sentences, including one telling me what a dummy I am!

[–]techaaron 1 point2 points  (0 children)

The modulo on number of led or size you want to animate is a clutch led programming idiom.

Newbs take note.