Guitar effects prosessor controller

Hi all - first post so thanks for having me here!

I’m looking to start programming and the first project that i wantt to have a go at is a foot controller for my guitar - there are a few ideas out there that i have seen but… I want to beable to send cc messages to my proseccor aswell as program change messages. the cc messages will trigger an effect within a patch to turn on with a press then off again with a press of the same button. I have seen cc messages been sent throught the analog inputs but never the digital ones. I really wanna build this project but want to know if it can be done.

Finally a friend of mine has a midi pedal that will do this, is there anny way i can get the software from that to make mine?

Thanks in advance