The wiring is ok. You have two types of problems in your program.
1) You have IF ... THEN <label> when you should have IF ... THEN GOSUB <label>
2) You set the I/O pins HIGH, but you never set them LOW (turn them off). What do you want to do about that?
Note that you have RETURNs, but you never do a GOSUB. That's a serious programming error. A GOSUB calls a subroutine and a RETURN returns from that GOSUB.
The DEBUG statement will never execute. Is that what you want?
Be careful about indenting. The indented statements after each IF THEN statement look like they're controlled by the IF THEN statement because they're indented. They're actually at the same "level" as the IF THEN and will always be executed. In Spin (for the Propeller), the indenting works and statements indented after an IF are controlled by the IF's condition, but not in Basic.
I'm talking about the " Program Running!" DEBUG statement.
It's ok to use indenting to make the IF THEN statement stand out. Some programming languages (like Spin and Python) use indenting to show statement dependency. Most others do not. In Stamp Basic, there's another form of the IF THEN statement where the THEN is paired with a subsequent ENDIF and everything in-between is controlled by the IF condition. Often indenting is used between the IF and ENDIF statements to clarify which statements are controlled by the IF.
Comments
1) You have IF ... THEN <label> when you should have IF ... THEN GOSUB <label>
2) You set the I/O pins HIGH, but you never set them LOW (turn them off). What do you want to do about that?
Note that you have RETURNs, but you never do a GOSUB. That's a serious programming error. A GOSUB calls a subroutine and a RETURN returns from that GOSUB.
Be careful about indenting. The indented statements after each IF THEN statement look like they're controlled by the IF THEN statement because they're indented. They're actually at the same "level" as the IF THEN and will always be executed. In Spin (for the Propeller), the indenting works and statements indented after an IF are controlled by the IF's condition, but not in Basic.
I don't understand your comments on the indentation. I idented so that the IF...THEN... statements stands out clearly.
It's ok to use indenting to make the IF THEN statement stand out. Some programming languages (like Spin and Python) use indenting to show statement dependency. Most others do not. In Stamp Basic, there's another form of the IF THEN statement where the THEN is paired with a subsequent ENDIF and everything in-between is controlled by the IF condition. Often indenting is used between the IF and ENDIF statements to clarify which statements are controlled by the IF.