Fancy Reset Pattern
Now that we can make awesome patterns with our shift registers, let’s make some code to apply to the pinball machines! We already know how to use an external button to reset the Arduino and flash a simple LED pattern, but now we have the means to make that startup light pattern super fancy by using the shift registers.
Open your timed-shift-pattern-mod and your reset-pattern-mod sketches. Combine them in such a way that a fancy shift register LED pattern of your choosing plays upon setup. Save your new sketch as fancy-reset-pattern in your Mod folder.
If you have time, you can invent more LED patterns, that can maybe be incorporated into your pinball machine to correspond to other events in the game, such as other switches or analog sensors being triggered. Next time, we’ll learn how to use the analog sensors and use sound as another output.
This is the last activity for this session. Have fun!