Set and Reset a function with 1 button

hi,

Found myself stuck on something that i tought to be easy, so i dont understand what im doing wrong!
I wanne use (for now) the select button to “enable power to arm” and then i wanne turn it of with the same button!

' pin 6 get high, but not able to make low, only when temp(1) is a different button (247)
if temp(1)=254 and prevtemp(1) =255 and bitje = 1 then 'change temp(1) to 247 then it works.
low Enable_power_to_arm'pin 6
bitje = 0'a bit i try to use as a memory
endif
if temp(1)=254 and prevtemp(1) =255 and bitje = 0 then 
high Enable_power_to_arm'pin 6
bitje = 1
endif

robert