[Solved] Create a software number increase prototype when a hardware switch turn on

Hi Folks:

I would like to create a software interface with a number increase when a hardware switch turn on. I use Arduino to create the code and use protopie to create the software interface. Individual run either hardware and sortware works, but I have no ideas how to connect them together to achieve my above described goal. And I attached my file, so that you could do me a favour. I am appreciate for your help~!

HW&SW num increase.rar