Midi volume and wah pedal

Hi Guys!
I recently purchased an Atomic Amplifire 6 guitar modeller. It 2 expression pedal inputs. I wanted to connect a Mission Engeneering type pedal for volume and wah controlling, with a toe footswitch, like conventional wah pedals (or just like Line 6 pedals) one pedal for both functions, footswitch changes. Unfortunatelly Amplifire’s inner programming doesn’t allow it at the moment.
So my plan is an arduino based midi expression pedal, whitch has a DPDT footswitch whitch determines, whether CC is 21 or 22 (volume or wah) and other other hand triggers sending CC23 or CC24 0 or 127 values (activating or deactivating wah and volume modules. I hope it can be understood.
I found a little code, that I modificated for the base of this project. This works, as a volume pedal, and calibrated to the pot int he pedal, but I don’t know, how to follow.

/*
Coded by Esteban G. from G14 studios

If you have a question about this script, don't hesitate in let me know.
You can use the contact form available on http://www.g14.cl
*/

#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();

#define expPin A0

int currentVal = 0;
int lastVal = 0;

void setup() {
// put your setup code here, to run once:
MIDI.begin();
}

void loop() {
// put your main code here, to run repeatedly:
currentVal = analogRead(expPin);
currentVal = map(currentVal, 0, 880, 0, 127);
currentVal = constrain(currentVal, 0, 127);

if(abs(currentVal-lastVal) > 1)
{
MIDI.sendControlChange(22, currentVal, 1);
}

lastVal = currentVal;
delay(5);
}

Any help appriciated.
Thanks in advance
Andras