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