Hi All.
I'm making a simple buzzer game using a 14m chip. The kind of game where you go along the track with the wand and if you hit the wire then you lose. I have added a contact point at the end of the track so there can be a win sequence too. Just a buzzer and 2 red led's flashing for lose, and a different buzzer and 2 green led's for win. I've ordered some parts so no circuit yet but I'm trying to write the code. I've written the pins at the top of the code.
I've got a main loop looking for the track to be made or the win button. Once the sequence has run its course, the buzzer turns off, the led's stay on until you press a button to reset.
I'm getting an error "Unknown Symbol" on the first if line of the main loop even though it is identical to lines I've written in other code for my 08m circuits. Any idea why is this an error?
Thanks
Paul
I'm making a simple buzzer game using a 14m chip. The kind of game where you go along the track with the wand and if you hit the wire then you lose. I have added a contact point at the end of the track so there can be a win sequence too. Just a buzzer and 2 red led's flashing for lose, and a different buzzer and 2 green led's for win. I've ordered some parts so no circuit yet but I'm trying to write the code. I've written the pins at the top of the code.
I've got a main loop looking for the track to be made or the win button. Once the sequence has run its course, the buzzer turns off, the led's stay on until you press a button to reset.
I'm getting an error "Unknown Symbol" on the first if line of the main loop even though it is identical to lines I've written in other code for my 08m circuits. Any idea why is this an error?
Code:
'Buzzer Lose =13
'Red led1 =12
'Red led2 =11
'Buzzer win =10
'Green led1 =9
'Green led2 =8
'Track =7
'Win Button =6
'Reset =5
Main: 'the main loop
if pin7 = 1 then lose
if pin6 = 1 then win
goto main
lose: 'lose sequence
pause 250
high 13
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
pause 250
low 12 : low 11
pause 250
high 12 : high 11
low 13
goto startagain
startagain: 'awaiting reset
if pin5 = 1 then goto main
goto startagain
win: 'win sequence
pause 250
high 10
high 9
high 8
wait 5
low 10
goto startagain
Thanks
Paul