Hello Guys,
I’ve been playing some more with the SEQ program and have a question:
I have a sequence I would like to program into the Atom Pro but I need a little help understanding the code. My guess is the “SeqIndex” variable is the number of times it will loop through the sequence? This number is at zero so I don’t understand. What I would like for the program to do is only run the entire sequence from start to finish only once. I do not want it to loop endlessly.
Can someone give me some help on this?
[code] ; ------------------------------------------------------
; Lynxmotion Visual Sequencer SSC-32 ‘Export’ Program
; Sequencer SSC-32 project : Brat02_head
; Date : 12/12/2007 4:48:00 PM
; ------------------------------------------------------
; Format : Basic Atom 24/28 IDE <= V02.2.1.1 or Pro IDE + SSC-32
; Original filename : Brat02_head.bas
; ------------------------------------------------------
Steps Wordtable $03DC, $0C15, $13CF, $7B85, $839E, $8BB0, $940A, $901F, $901F, |
$7A48, $781F, $781F, |
$0304, $0CA5, $1488, $7D4B, $8198, $8CDD, $9537, $901F, $901F, |
$050F, $7A16, $841A, $801F, $801F, |
$0ACB, $12A0, $7857, $8B21, $934C, $901F, $901F, |
$0347, $7D64, $825B, $801F, $801F, |
$0CA5, $1488, $7B8B, $8CDD, $9537, $901F, $901F, |
$04FE, $79CC, $8440, $801F, $801F, |
$0ACB, $12A0, $7B8B, $8B21, $934C, $901F, $901F, |
$0326, $7D19, $8234, $801F, $801F, |
$0CA5, $1488, $7B8B, $8CDD, $9537, $901F, $901F, |
$04A9, $79FD, $8406, $801F, $801F, |
$0477, $0C15, $13CF, $7B8B, $8BB0, $940A, $901F, $901F, |
$03DC, $839E, $801F, $801F
SeqPos Wordtable $0000, |
$0056
SeqIndex var Word
Index var Word
LastServo var Byte
TmpServo var Byte
TmpValue var Word
DejaVu var bit
LastServo = 99
DejaVu = 0
pause 500
Main
For SeqIndex = 0 to 0
For Index = SeqPos(SeqIndex) to SeqPos(SeqIndex + 1) - 1
TmpServo = Steps(Index) >> 11
TmpValue = Steps(Index) & 2047
if LastServo = TmpServo then
TmpValue = TmpValue << 5
if DejaVu then
Pause TmpValue
LastServo = 99
else
serout p15,i38400,“T”, DEC TmpValue, 13]
DejaVu = DejaVu ^ 1
endif
else
TmpValue = TmpValue + 500
serout p15,i38400,"#", DEC TmpServo, “P”, DEC TmpValue]
DejaVu = 0
LastServo = TmpServo
endif
next
next
goto Main
[/code]