by visuvius » Wed Jan 16, 2008 5:18 am
            
            
                    
                by visuvius
Wed Jan 16, 2008 5:18 am
            
            
            Ok, this is what I just tried and it didn't work but hopefully its a start:
GOTO AUTO 
FILL 255,10000 
DIM RR AS BYTE 
DIM A AS BYTE 
DIM A16 AS BYTE 
DIM A26 AS BYTE 
DIM n AS INTEGER 
DIM i AS BYTE
CONST ID = 0 ' 1:0, 2:32, 3:64, 4:96, 
'== Action command check (50 - 82) 
'IF RR > 50 AND RR < 83 THEN GOTO action_proc 
RR = 0 
PTP SETON 
PTP ALLON 
'== motor diretion setting ====================== 
DIR G6A,1,0,0,1,0,0 
DIR G6B,1,1,1,1,1,1 
DIR G6C,0,0,0,0,0,0 
DIR G6D,0,1,1,0,1,0 
'== motor start position read =================== 
TEMPO 230 
MUSIC "CDE" 
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,0 
'== motor power on ============================= 
SPEED 5 
MOTOR G24 
GOSUB standard_pose 
'================================================ 
MAIN: 
A = REMOCON(1)
A = A - ID
IF A = 18 THEN GOTO MAIN1
IF A = 32 THEN GOTO MAIN2
IF A = 23 THEN GOTO MAIN3 
GOTO main
This is my version of your "Bank Select".  What I'm trying to tell it to do is goto MAIN1 if "E" is pressed, MAIN 2 if "F" is pressed and so on.  I assumed that 18, 32, and 23 are the Remocon codes for those buttons but I might be completly wrong about that. 
'--------------------------------------------------
Here are my 3 different routines.  I'm trying to tell it to go back to MAIN if I press the power button.
MAIN1:        
A = REMOCON(1) 
A = A - ID
IF A = 16 THEN GOTO MAIN
ON A GOTO MAIN,K1,K2,K3,K4,K5
GOTO MAIN 
'==================================================
MAIN2: 
A = REMOCON(1) 
A = A - ID 
IF A = 16 THEN GOTO MAIN
ON A GOTO MAIN,A1,A2,A3,A4,A5
GOTO MAIN 
'===================================================
MAIN3: 
A = REMOCON(1) 
A = A - ID 
IF A = 16 THEN GOTO MAIN
ON A GOTO MAIN,B1,B2,B3,B4,B5
GOTO MAIN 
At this point I have all my different subroutines (moves).  
Of course none of this worked and I'm sure there are some collosal errors I've made.  
I just realized its probably a bad idea calling all the different routines MAIN so I will change that to your verbage. 
Thanks again.
            Ok, this is what I just tried and it didn't work but hopefully its a start:
GOTO AUTO 
FILL 255,10000 
DIM RR AS BYTE 
DIM A AS BYTE 
DIM A16 AS BYTE 
DIM A26 AS BYTE 
DIM n AS INTEGER 
DIM i AS BYTE
CONST ID = 0 ' 1:0, 2:32, 3:64, 4:96, 
'== Action command check (50 - 82) 
'IF RR > 50 AND RR < 83 THEN GOTO action_proc 
RR = 0 
PTP SETON 
PTP ALLON 
'== motor diretion setting ====================== 
DIR G6A,1,0,0,1,0,0 
DIR G6B,1,1,1,1,1,1 
DIR G6C,0,0,0,0,0,0 
DIR G6D,0,1,1,0,1,0 
'== motor start position read =================== 
TEMPO 230 
MUSIC "CDE" 
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,0 
'== motor power on ============================= 
SPEED 5 
MOTOR G24 
GOSUB standard_pose 
'================================================ 
MAIN: 
A = REMOCON(1)
A = A - ID
IF A = 18 THEN GOTO MAIN1
IF A = 32 THEN GOTO MAIN2
IF A = 23 THEN GOTO MAIN3 
GOTO main
This is my version of your "Bank Select".  What I'm trying to tell it to do is goto MAIN1 if "E" is pressed, MAIN 2 if "F" is pressed and so on.  I assumed that 18, 32, and 23 are the Remocon codes for those buttons but I might be completly wrong about that. 
'--------------------------------------------------
Here are my 3 different routines.  I'm trying to tell it to go back to MAIN if I press the power button.
MAIN1:        
A = REMOCON(1) 
A = A - ID
IF A = 16 THEN GOTO MAIN
ON A GOTO MAIN,K1,K2,K3,K4,K5
GOTO MAIN 
'==================================================
MAIN2: 
A = REMOCON(1) 
A = A - ID 
IF A = 16 THEN GOTO MAIN
ON A GOTO MAIN,A1,A2,A3,A4,A5
GOTO MAIN 
'===================================================
MAIN3: 
A = REMOCON(1) 
A = A - ID 
IF A = 16 THEN GOTO MAIN
ON A GOTO MAIN,B1,B2,B3,B4,B5
GOTO MAIN 
At this point I have all my different subroutines (moves).  
Of course none of this worked and I'm sure there are some collosal errors I've made.  
I just realized its probably a bad idea calling all the different routines MAIN so I will change that to your verbage. 
Thanks again.