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

Amphibionics 06  3/24/03  9:02 AM  Page 255
                                       Chapter 6 / Crocobot: Build Your Own Robotic Crocodile
                        Insert the 16C71 into the 18-pin socket on the remote control cir-
                        cuit board. Turn the power on at the robot, and then turn on the
                        power to the remote control. When the button on the remote con-
                        trol is pushed, the LED above the button will light up, indicating
                        that a transmission has been sent. At the same time, the piezo
                        speaker on the robot will make a couple of tones each time the
                        button is pushed. You should also notice that the LED next to the
                        receiver module on the robot’s controller board will flash on and
                        off rapidly, as data comes through. If nothing happens when the
                        button is pushed, check all of your wiring and battery supplies.
                        Once the units are working together correctly, you can check the
                        range of the transmitter by walking away from the robot and hold-
                        ing the push button on the remote control down. For later experi-
                        mentation, you can program this button for other tasks.

                        '------------------------------------------------------------------------------------------------------------------------------
                                                                                   PROGRAM 6.9
                        '  Name      : transmit-test.bas                           transmit-test.bas
                        '  Compiler  : PicBasic Pro - MicroEngineering Labs        program listing
                        '  Notes      : Program to test wireless link using the
                        '                : Linx 433LC series transmitter and receiver
                        '------------------------------------------------------------------------------------------------------------------------------
                        ' set PortA  inputs
                        trisa = %00011111

                        ' PortB set as outputs. pin 2 input
                        trisb = %00000100

                        '------------------------------------------------------------------------------------------------------------------------------
                        ' initialize variables

                        include "modedefs.bas"


                        tx_baud          CON N2400

                        txmit                VAR PORTB.0

                                                                                                 255
   271   272   273   274   275   276   277   278   279   280   281