/Photo-interrupter

To practice how to use the Photo-interrupter and develop by using interrupt function.

Primary LanguageC++

Photo-interrupter

The Photo-interrupter is a type of transmission photosensor, which typically consists of a light emitting and receiving elements aligned facing each other in a single slot, that works by detecting light blockage when a object comes between elements, acting as an optical switch. When the Photo-interrupter detect object, current flow decreases, causing the voltage to rise. Without object, current flow increases, causing the voltage to drop. From this exercise, practice how to use the Photo-interrupter and develop by using interrupt function.