Output to operate as (and in parallel with) momentary pushbutton

Read the forum guidelines.

Post a schematic of the project.

Post the whole code.

What does that mean? That conveys no actual information that we can use to help you.