I am trying to make my Indoor basketball hoop keep my score. How can I use a photoresistor and a seven-segment display to add a number every time a ball passes threough?
I've never seen a seven segment display used as an adder.
How do you propose distinguishing between a ball passing through the hoop, and, say, a hand?
Well it's meant to be a simple project, so really, if anything passes through the hoop it should count it.
Have you thought about adapting the state change detection example in the IDE?
In fact in regard to "state change", using a LDR, you will need to use analogRead to monitor the general level of illumination and respond (only) to relatively rapid (occurring over a couple of seconds) changes.
Connect the LDR from an analog input (other than A6 or A7 on the Nano) to ground and use INPUT_PULLUP on that pin.