Testing the STM32 internal pulldown resistor and an opto interruptor to reduce the total components needed for my encoder project