Hello,
I currently test an hardware that use Digital Input (3 inputs). I try to use an photocoupler : Renesas PS2801-4
I think I have make mistake with the way I use it because if I set : pinmode (input, INPUT_PULLUP), at startup the input is high.
In this schematic, the B pad is put to GROUND with a button, which *should* trigger the LED and put the Teensy input to ground too.
My code use "bounce2" library and have events to identify short press and long press.
Without the photocoupler, if I put the input to ground it behave normal.
But with the photocoupler the behaviour seem inverted.
Can someone point me to my error ?
Thank you,
Manu
I currently test an hardware that use Digital Input (3 inputs). I try to use an photocoupler : Renesas PS2801-4
I think I have make mistake with the way I use it because if I set : pinmode (input, INPUT_PULLUP), at startup the input is high.
In this schematic, the B pad is put to GROUND with a button, which *should* trigger the LED and put the Teensy input to ground too.
My code use "bounce2" library and have events to identify short press and long press.
Without the photocoupler, if I put the input to ground it behave normal.
But with the photocoupler the behaviour seem inverted.
Can someone point me to my error ?
Thank you,
Manu