OK I think ive got this licked.. If anyone is intersted this is the best code Ive come up with so for for a three mode Rapid Fire.
Its a combination of AM's latest MW2 and his earlier akimbo .
1st mode is right trigger rapid fire
2nd is 3 round burst, 4 round if fully depressed trigger.
3rd is rapid fire on left and right trigger independent and together.
I just started learning the coding last night so please dont yell to loud if something is out of place. LOL
CODE
Setfreq m8
Rapidoff:
do
Let dirs=0
if pin3 = 1 then pause1
loop while pin3 = 0
goto Rapidoff
Pause1:
pause 500
goto Rapidon1
Rapidon1:
High 1
Readadc 4,b0
If b0 < 95 then Rapidfire
If pin3 = 1 then Pause2
goto Rapidon1
Rapidfire:
Do
High 4
Pause 100
Low 4
Pause 100
b0=b0 and %00000000
Let dirs=b0
Readadc 4, b0
Loop while b0 < 95
goto Rapidon1
Pause2:
Low 1
pause 500
goto rapidon2
Rapidon2:
High 1
Readadc 4,b0
If b0 < 95 then Burst3
If pin3 = 1 then Pause3
goto rapidon2
Burst3:
Low 4
Pause 100
High 4
Pause 100
Low 4
Pause 100
High 4
Pause 100
Low 4
Pause 100
High 4
Pause 100
b0=b0 and %00000000
Let dirs=b0
Readadc 4, b0
goto Pause4
Pause3:
Low 1
pause 500
goto Rapidon3
Rapidon3:
High 1
Readadc 4,b0
Readadc 2,b1
If b0 < 95 then Right
If b1 < 95 then Left
If pin3 = 1 then Pause5
goto Rapidon3
Right:
Do
Low 4
Pause 100
High 4
Pause 100
b0=b0 and %00000000
Let dirs=b0
Readadc 4, b0
Readadc 2, b1
If b0 < 95 and b1 < 95 then dual
Loop while b0 < 95
goto Rapidon3
Left:
Do
Low 2
Pause 100
High 2
Pause 100
b1=b1 and %00000000
Let dirs=b1
Readadc 2, b1
Readadc 4, b0
If b0 < 95 and b1 < 95 then Dual
Loop while b1 < 95
goto Rapidon3
Dual:
Do
Low 4
Low 2
Pause 100
High 4
High 2
Pause 100
b0=b0 and %00000000
Let dirs=b0
Readadc 4, b0
Readadc 2, b1
Loop while b0 < 95 and b1 < 95
goto Rapidon3
Pause4:
do
Readadc 4,b0
pause 150
loop while b0 < 95
goto Rapidon2
Pause5:
pause 1000
goto Rapidoff