The routine (shown in the screenshot below) use the Neopixels package (use the add package option on the menu to add it) to do two things:
- On pressing button B - cycle through the colours and shift the colour to the next pixel producing a shifting pattern.
- On pressing button A - the pixels are cleared one by one.
Code is shown above, and thank you to Jonathan "Peli" de Halleux (@pelikhan) for pointing out the redundant code I had left in, it is appreciated.
The video below shows the system in action:
You can try the code out in the simulator below:
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon
No comments:
Post a Comment