noob question

josh_typex

New Member
hey guys, the only way i can get a program to run is put the goto main command at the end, thus repeating the program. How do i make a program that will just run through once?
 

Tom2000

Senior Member
Code:
Main:

    ' code in here will run just once

end

**************************

Main:

  do

    ' code in here will run forever

  loop

end
 

MoonGoon

Member
You can use the:

"Stop" or "End" commands.
They will both halt your programe till the power is cycled (eg. reset) or your download a new program.

The "End" command makes the PICAXE enter power conservation mode.
The "stop" command does not.

Hope this helps.
 

josh_typex

New Member
thats what i've been doing, but it doesn't run when i turn the switch on...
here is my code:
main:
high 1
pause 1600
low 1
pause 1100
high 1
pause 1100
high 2
pause 300
low 1
low 2
pause 500
high 1
pause 100
low 1
end
 
Top