Hey Stephen,
good news!
the code works! I did some rewiring and it appears I may have had one of the wires in the wrong port. My sincerest apologies for that.
I am now fine tuning the threshold and so far so good!
My next step is to connect an LED strip to this circuit.
am I correct in just doing so and including a MosFet and 12v power into the breadboard in the circuit?
Let me know.
Cheers again!
Yes a MOSFET will work to provide 12v power, and can be ‘switched’ by the digital out from the Arduino. You can certainly test it in a breadboard but I caution you that a breadboard can only handle so much current.
“Breadboard is commonly rated for five volts at one amp or fifteen volts at one-third of an amp , both of which have a power dissipation of five watts”
This means that you should solder your MOSFET rather than use a breadboard for those connections.