Introduction - If you have any usage issues, please Google them yourself
This example is using the hardware SPI interface to send a variable to the loop 74HC595, and after the data is sent through the microcontroller interface to another IO PB2 output a " latch" pulse, the 74HC595 shift register to latch the data output to the register, and drive 8 LED outputs, to achieve the effect of water back and forth.