My program is simples, so I thought. Simple motor up/down in a colliery, with an audable signal to start the process, fine. Upper level to mid level, wait a time, same signal to bottom level, another wait, different signal to raise to mid level another wait, same signal to top level. Repeat. I am using a 18m chip which offers me enough inputs and outputs that are required.
Have dedicated symbols for the motor and the various leds, sound= 5, So I am calling Gosub noise; rem calling sound to next levels
noise: for b3 = 1 to 4
Pause 100
sound 5, ( 100, 75)
next b3
Pause 200
for b3 = 1 to 2
Sound 5, (100,75)
pause 100
next b3
pause 300
return
Now the return loops me back to noise again & on this second return gives me a stack over flow error. Have tried the example in the manual but that takes me back to the end of the main and does not complete any further program. am aware that I require a different Gosub for the raise as it's it different signal .Have tried second
Gosub noise: within the prog but the program never reaches it. If I leave out the command Return the program will run to the next Gosub noise; what am I not doing correctly. RJ
Have dedicated symbols for the motor and the various leds, sound= 5, So I am calling Gosub noise; rem calling sound to next levels
noise: for b3 = 1 to 4
Pause 100
sound 5, ( 100, 75)
next b3
Pause 200
for b3 = 1 to 2
Sound 5, (100,75)
pause 100
next b3
pause 300
return
Now the return loops me back to noise again & on this second return gives me a stack over flow error. Have tried the example in the manual but that takes me back to the end of the main and does not complete any further program. am aware that I require a different Gosub for the raise as it's it different signal .Have tried second
Gosub noise: within the prog but the program never reaches it. If I leave out the command Return the program will run to the next Gosub noise; what am I not doing correctly. RJ