SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By RushanArshad
#194562
Hello Everyone,
I am using Photo Interrupter Sensor and Breakout Board from Spark Fun with arduino to count the number of pulses. I want to send '1' to the serial monitor if an object passes from the slot and 0 if there is nothing passed from the slot of Photo Interrupter Sensor. Can anyone give me an example code for this?

I look forward to hearing from you all.