While developing a spinoff version using an electric keyboard footswitch I found that such footswitch is normaly closed, and opens when you step over it.
No problem. it is simply a matter of changing a compare value.
if ((digitalRead(_Pin_Left_footswitch) == 0)) footkeys |= (1 << _Pin_Left_footswitch);
if ((digitalRead(_Pin_Middle_footswitch) == 0)) footkeys |= (1 << _Pin_Middle_footswitch);
if ((digitalRead(_Pin_Right_footswitch) == 1)) footkeys |= (1 << _Pin_Right_footswitch); // use a NC contact
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.