Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - # Load required components
 - loadrt or2 count=1
 - loadrt timedelay count=1
 - loadrt oneshot count=1
 - loadrt limit3 count=1
 - loadrt not count=1
 - loadrt and2 count=1
 - loadrt time
 - addf or2.0 servo-thread
 - addf timedelay.0 servo-thread
 - addf oneshot.0 servo-thread
 - addf limit3.0 servo-thread
 - addf not.0 servo-thread
 - addf and2.0 servo-thread
 - # Combine axis motion signals
 - net x-moving motion.axis.0.in-motion => or2.0.in0
 - net y-moving motion.axis.1.in-motion => or2.0.in1
 - net any-moving or2.0.out
 - # Set up a 20-second repeating pulse generator using limit3
 - setp limit3.0.min 0
 - setp limit3.0.max 20
 - setp limit3.0.scale 1
 - net runtime time.time => limit3.0.in
 - # Detect when 20 seconds has passed
 - net cycle-done limit3.0.on-max => oneshot.0.trigger
 - # Create a 1-second pulse from the oneshot
 - setp oneshot.0.width 1.0
 - net pulse1s oneshot.0.out
 - # Combine pulse and motion condition
 - net enable-pulse and2.0.out => parport.0.pin-05-out
 - net pulse1s => and2.0.in0
 - net any-moving => and2.0.in1
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment