Need help coding for light sensor linked to motors

Hi, i’m kind of new to the arduino stuff. So far i’ve had no prodlem with setting up the wiring etc. on the breadboard and stuff…it’s just the coding that poses problems for me. I’m not exactly tech savvy.

Anywho, i’m working on a Rube Goldberg Machine and im hoping to using some arduino stuff on it. There is a bit in the the machine where a light sensor would be covered up by a marble causing motors (3) to start. My problem is the codig for this. So far i’ve only used the example codes for the experiments i’ve done so far.

So if anyone is willing to help me please let me know.


P.S. let me know if i’ve left anything out, that you migt need

Take readings of the light level, when it gets to a certain threshold, turn the motors on.