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

Amphibionics 06  3/24/03  9:02 AM  Page 259
                                                                                   PROGRAM 6.11
                        low enable_left
                        low forward_left
                                                                                   rx-remote.bas program
                                                                                   listing (continued)
                        low reverse_left  Chapter 6 / Crocobot: Build Your Own Robotic Crocodile
                        low enable_right
                        low forward_right
                        low reverse_right
                        SOUND PIEZO,[115,10,50,10]
                        start:

                        serin rxmit,rx_baud,["Z"],control

                        if control = "A" then
                          gosub walk_forward
                        endif


                        if control = "B" then
                          gosub walk_reverse
                        endif

                        if control = "C" then
                          gosub turn_left
                        endif

                        if control = "D" then
                          gosub turn_right
                        endif

                        if control = "E" then
                          sound piezo,[115,10,50,10]
                        endif

                        if control = "F" then
                          low enable_left
                          low forward_left
                          low reverse_left


                                                                                                 259
   275   276   277   278   279   280   281   282   283   284   285