Page 264 - Amphibionics : Build Your Own Biologically Inspired Robot
P. 264

Amphibionics 06  3/24/03  9:02 AM  Page 243
                                       Chapter 6 / Crocobot: Build Your Own Robotic Crocodile
                        enable_right     VAR PORTB.1
                        forward_right    VAR PORTB.2
                                                                                   motor-test.bas program
                                                                                   listing (continued)
                        reverse_right    VAR PORTB.3                               PROGRAM 6.3
                        enable_left       VAR PORTB.4
                        reverse_left      VAR PORTB.5
                        forward_left      VAR PORTB.6
                        limit_left            VAR PORTA.0
                        limit_right          VAR PORTA.1
                        piezo                 VAR PORTA.3
                        low enable_left
                        low forward_left
                        low reverse_left

                        low enable_right
                        low forward_right
                        low reverse_right



                        SOUND PIEZO,[115,10,50,10]

                        start:


                        high enable_left
                        high forward_left
                        pause 3000
                        low enable_left
                        low forward_left

                        high enable_right
                        high forward_right
                        pause 3000
                        low enable_right
                        low forward_right

                        goto start

                        end


                                                                                                 243
   259   260   261   262   263   264   265   266   267   268   269