
 
 V a r i a b l e   N u m e r i c   S l o t M o t o r 1 
 
 V a r i a b l e   N u m e r i c   S l o t M o t o r 2 
 
 S l o t M o t o r 1   =   1 
 
 S l o t M o t o r 2   =   3 
 
 
 
 B u t t o n   1   T e x t   H o m e   M O T O R S 
 
 B u t t o n   2   T e x t   L o o p 
 
 
 
 S t o p 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     L O O P   T E S T 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 L a b e l   L o o p 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   4 5 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   4 6 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   4 7 
 
 	 G o s u b   W a i t M o t o r 
 
 	 L o a d   " S U O N O _ D E L _ V E N T O _ M A R E . m p 3 " 
 
 	 W a i t   S e c o n d s   1 
 
 	 L o a d   S t o p 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   4 8 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   4 9 
 
 	 G o s u b   W a i t M o t o r 
 
 	 L o a d   " C a l i p s o   E l e n i . w a v " 
 
 	 W a i t   S e c o n d s   1 
 
 	 L o a d   S t o p 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   5 0 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   5 1 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 S l o t   ( S l o t M o t o r 2 )   =   5 2 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 
 
 	 S l o t   ( S l o t M o t o r 1 )   =   5 2 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 S l o t   ( S l o t M o t o r 2 )   =   5 2 
 
 	 G o s u b   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   1 
 
 	 
 
 G o t o   L o o p 
 
 
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     H O M E   M O T O R S 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   H O M E   M O T O R S 
 
 	 S l o t M o t o r   =   S l o t M o t o r 1 
 
 	 S l o t S e n s o r   =   5 
 
 	 S p e e d S e a r c h   =   + 0 . 1           '   d i r e c t i o n   a n d   s p e e d   r o t a z i o n e 
 
 	 S p e e d R e t u r n   =   - 0 . 0 1         '   d i r e c t i o n   a n d   s p e e d 
 
 	 D e c l a r e d Z e r o   =   0 
 
 	 I n i t i a l P o s i t i o n   =   - 3 0     '   r e l a t i v e   t o   D e c l a r e d Z e r o 
 
 	 G o s u b   H o m e 
 
 	 
 
 	 S l o t M o t o r   =   S l o t M o t o r 2 
 
 	 S l o t S e n s o r   =   6 
 
 	 S p e e d S e a r c h   =   + 0 . 1           '   d i r e c t i o n   a n d   s p e e d   r o t a z i o n e 
 
 	 S p e e d R e t u r n   =   - 0 . 0 1         '   d i r e c t i o n   a n d   s p e e d 
 
 	 D e c l a r e d Z e r o   =   0 
 
 	 I n i t i a l P o s i t i o n   =   - 3 0     '   r e l a t i v e   t o   D e c l a r e d Z e r o 
 
 	 G o s u b   H o m e 
 
 R e t u r n 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     H o m e   t h e   M o t o r ( S l o t M o t o r )   t o   t h e   S e n s o r ( S l o t S e n s o r ) 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 V a r i a b l e   N u m e r i c   S l o t M o t o r 
 
 V a r i a b l e   N u m e r i c   S l o t S e n s o r 
 
 V a r i a b l e   N u m e r i c   S p e e d S e a r c h 
 
 V a r i a b l e   N u m e r i c   S p e e d R e t u r n 
 
 V a r i a b l e   N u m e r i c   D e c l a r e d Z e r o 
 
 V a r i a b l e   N u m e r i c   I n i t i a l P o s i t i o n 
 
 
 
 L a b e l   H o m e 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - -   d e t a c h   i f   s e n s o r   i s   a c t i v e 
 
 	 I f   S l o t ( S l o t S e n s o r )   >   5 0 0 
 
 	 	 S l o t ( S l o t M o t o r )   =   S l o t ( S l o t M o t o r )   +   S p e e d R e t u r n 
 
 	 E n d I f 
 
         '   - - - - - - - - - - - - - - - - - - - - - - - - -   s e a r c h   t h e   s e n s o r 
 
 L a b e l   S e a r c h H o m e 
 
 	 S l o t ( S l o t M o t o r )   =   S l o t ( S l o t M o t o r )   +   S p e e d S e a r c h 
 
 	 W a i t   S e c o n d s   0 . 0 0 1 
 
 	 I f   S l o t ( S l o t S e n s o r )   >   5 0 0 
 
 	 	 G o s u b   W a i t M o t o r 
 
 	 	 G o t o   D e t a c h S e n s o r 
 
 	 E n d I f 
 
 G o t o   S e a r c h H o m e 
 
         '   - - - - - - - - - - - - - - - - - - - - - - - - -   d e t a c h   f r o m   t h e   s e n s o r 
 
 L a b e l   D e t a c h S e n s o r 
 
 	 S l o t ( S l o t M o t o r )   =   S l o t ( S l o t M o t o r )   +   S p e e d R e t u r n 
 
 	 W a i t   S e c o n d s   0 . 0 0 1 
 
 	 I f   S l o t   ( S l o t S e n s o r )   <   5 0 0 
 
 	 	 G o s u b   W a i t M o t o r 
 
 	 	 G o t o   A s s i g n Z e r o 
 
 	 E n d I f 
 
 G o t o   D e t a c h S e n s o r 
 
         '   - - - - - - - - - - - - - - - - - - - - - - - - -   r e s e t   a n d   m o v e   t o   I n i t i a l P o s 
 
 L a b e l   A s s i g n Z e r o 
 
 	 S l o t ( S l o t M o t o r )   =   R e s e t 
 
 	 W a i t   S e c o n d s   0 . 0 8 
 
 	 S l o t ( S l o t M o t o r )   =   D e c l a r e d Z e r o 
 
 	 G o s u b   W a i t M o t o r 
 
 	 S l o t ( S l o t M o t o r )   =   I n i t i a l P o s i t i o n 
 
 R e t u r n 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '       W a i t   u n t i l   t h e   m o t o r ( S l o t M o t o r )   i s   s t o p p e d 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   W a i t M o t o r 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 L a b e l   W a i t 1 
 
 	 	 I f   A b s ( S l o t ( S l o t M o t o r   +   1 ) )   <   0 . 0 1 
 
 	 	 	 R e t u r n 
 
 	 	 E n d I f 
 
 	 	 W a i t   S e c o n d s   0 . 0 0 5 
 
 	 G o t o   W a i t 1 
 
 G o t o   W a i t M o t o r 
 
 
 
 
 
 ' W A T C H   S p e e d 
 
 ' W A T C H   W a i t   S e c o n d s   2 
 
 ' W A T C H   W a i t   S e c o n d s   2 
 
 ' W A T C H   W a i t   S e c o n d s   2 
 
 ' W A T C H   W a i t   S e c o n d s   2 
 
 ' W A T C H   W a i t   S e c o n d s   2 
 
 ' E X E C   S l o t ( 2 )   =   0 
 
 