Test Attachment 2

Tricky Dicky

Senior Member
'BASIC converted from flowchart:
'Untitled Flowchart:2
'Converted on 13/04/2008 at 16:00:13


main:
let b0=3
label_12D: readadc 0,b1
let w3=b0*b1
debug w3
gosub left_to_right
readadc 0,b1
let w3=b0*b1
gosub right_to_left
goto label_12D


left_to_right:
let pins = 2 ' %00000010
pause w3
let pins = 4 ' %00000100
pause w3
let pins = 8 ' %00001000
pause w3
let pins = 16 ' %00010000
pause w3
let pins = 32 ' %00100000
pause w3
let pins = 64 ' %01000000
pause w3
let pins = 0
sound 7,(100,10)
return


right_to_left:
let pins = 32 ' %00100000
pause w3
let pins = 16 ' %00010000
pause w3
let pins = 8 ' %00001000
pause w3
let pins = 4 ' %00000100
pause w3
let pins = 2 ' %00000010
pause w3
let pins = 1 ' %00000001
pause w3
let pins = 0
sound 7,(100,10)
return
 
Top