temp switch with blinking LED

Working on a bodycontroll module for my honda, I'm having some issues with he language. To turn the turn
signals on with a temp switch should I use if statement?

If (turnbutton > 500)
{ //blink without delay
}
If (turnbutton < 500)
{ //end blink without delay
}
I know it's dumb to have to ask but im still learning and some of the tutorials aren't clear on how to combine various aspects of the language.

griffinzein:
To turn the turn signals

What "signals"?

on with a temp switch

What "temp switch"?

Pretend like we have no idea what your project is, or what you are trying to do.

should I use if statement?

For what? The code you posted it too big. Try explaining WHAT you are trying to, rather than HOW you think it should be done.

The goal is to use temporary buttons to operate two turn signals, high and low beam selector, and brake light with a subroutine for emergency flashers.
The issue I am having is writing code for the temp button to turn the turn signal on and keep them on untill the button is pressed again.

griffinzein:
The goal is to use temporary buttons to operate two turn signals, high and low beam selector, and brake light with a subroutine for emergency flashers.
The issue I am having is writing code for the temp button to turn the turn signal on and keep them on untill the button is pressed again.

So you want to use the switch as a toggle? In that case, take a look at the StateChangeDetection example.

Didnt think of that. Thank you.