I've built my own optical switch, using a laser and a photoresistor (see image). Currently it's connected to an arduino uno. If the value from the sensor goes below a certain value, I can tell the beam is broken.
Now I want to connect it to my RAMPS (running Marlin) instead of the uno. Can I connect it directly to an analog pin and change something in the configuration to make it work, or do I have to build an external circuit to convert it to a digital output?
Now I want to connect it to my RAMPS (running Marlin) instead of the uno. Can I connect it directly to an analog pin and change something in the configuration to make it work, or do I have to build an external circuit to convert it to a digital output?