3PDT Switch Coded to act as Momentary Button?

Hi, I'm relatively new to Arduino and programming so apologies in advance.

What I essentially want to do is use a 3PDT switch to save a 'preset' in EEPROM. The main problem is that obviously 3PDT switches are either off or on and was wondering is there a way to code so it acts as a momentary push button? (Only looks and stores the fact that the switch is on once and then ignores after a certain time)

In other words every time the switch is pressed it saves a number once until its pressed again and overwrites the number.

The reason I'm using 3PDT switches is because they will be controlled with feet in a guitar pedal so can't be tiny little things!

It would be great if someone could point me in the right direction code-wise that would be great as I have limited knowledge and experience.

Thanks,
James

The main problem is that obviously 3PDT switches are either off or on and was wondering is there a way to code so it acts as a momentary push button?

So, you want to do something when the switch BECOMES on, not IS on? Look at the state change detection example.