Page 235 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 235

214     Bu il d  Y o ur  O w n  Q u a d c o p t e r


                             assembly is shown in Figure 8.23. Only two connections are needed between the BOE and
                             the XBee module, as shown in Table 8.8. The BOE is powered through the mini USB cable
                             that attaches to the laptop running the PSerT program, while the XBee module is powered
                             through the BOE sockets.
                                The receive program is named Test XBee Receive.spin, and the source code is shown
                             below:

                             OBJ
                               system : “Propeller Board of Education”      ‘ PropBOE
                                                                                configuration tools
                               pst       : “Parallax Serial Terminal Plus”  ‘ Terminal
                                                                                communication tools
                               time     : “Timing”                          ‘ Timing convenience
                                                                                  methods
                               xb        : “XBee_Object_1”                  ‘ XBee communication
                                                                                  methods

                             PUB Go | c
                               system.Clock(80_000_000)                 ‘ System clock -> 80 MHz
                               pst.Start(115_200)                       ‘ Start Parallax Serial
                                                                                Terminal
                               xb.start(7,6,0,9600)                     ‘ Propeller Comms -
                                                                                    Baud
                               xb.AT_Init                               ‘ Initialize for fast AT































                             Figure 8.23  XBee and Propeller BOE receiver node.
   230   231   232   233   234   235   236   237   238   239   240