Close

Using NC switches

A project log for F.P.S: Foot Presto Switch

Pedal Switch for playing FPS games

danjovicdanjovic 03/23/2016 at 02:070 Comments

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