4 dig 7 seg display with 74HC595

I am trying to do a bigger project with a 4 dig 7 seg display and using the 74HC595 to reduce pin usage, but looking at the sample code that came with the Elegoo starter kit, I can't make sense of the table usage and what the definitions are. My overall goal is to make the display show numbers using buttons and a potentiometer. I am following an article that had all the pins on his display connect to his Arduino mega, but I want to make it more efficient. The link to the project is here. The code is also attached.

Four_Digital.ino (930 Bytes)

  1. If you are posting code or error messages, use "code" tags

Just use your shift register and the shiftOut() function to replace the 8 Arduino Mega pins that go to the 8 segment pins (well, 7 segments and a decimal point).