nickwoodrow
New Member
Hi all, Happy New year!
I've just ordered an Ibutton and reader from the Picaxe Rev-ed store and downloaded the code from the Specification data on their page. (see below). I notice it is for Picaxe-08M I have the more up to date O8m2 this is also on the setings for Picaxe editor. My problem is when I paste the code and check syntax i am getting the following message
Loop:
Syntax error on line 6 at/before position 4
Error: Loop without Do
Could any body help out please. TIA
I've just ordered an Ibutton and reader from the Picaxe Rev-ed store and downloaded the code from the Specification data on their page. (see below). I notice it is for Picaxe-08M I have the more up to date O8m2 this is also on the setings for Picaxe editor. My problem is when I paste the code and check syntax i am getting the following message
Loop:
Syntax error on line 6 at/before position 4
Error: Loop without Do
Could any body help out please. TIA
Code:
main:
let b6 = 0 ' reset family code to 0
low 0 ' LED off
low 1 ' output off
loop:
toggle 0 ' LED on or off
if pin3 = 0 then open ' switch pushed
pause 250 ' wait
readowsn 4 ' read serial number on input4
if b6 <> 0 then test ‘ ibutton detected
goto loop
' ibutton detected so check code
' if wrong code jump back to start
test:
sound 2,(50,50) ' beep
high 0 ' probe LED on
if b6 <> $FF then main ' !!! modify all these
if b7 <> $00 then main ' !!! to your unique
if b8 <> $11 then main ' !!! serial number
if b9 <> $22 then main
if b10 <> $33 then main
if b11 <> $44 then main
if b12 <> $55 then main
if b13 <> $CC then main
'Everything is ok so switch output on for 5 seconds
open:
sound 2,(100,50) ' beep
high 1 ' LED on
high 2 ' output on
pause 5000 ' wait 5 seconds
goto main