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

Chapter 8: GPS and a Real- T ime Situational Displa y           215



                                                 XBee Module      Propeller BOE
                                                 DO               P7
                                                 DI               P6

                                               Table 8.8  XBee and Propeller BOE Connections



                               xb.AT_ConfigVal(string(“ATMY”), 9)       ‘ Set MY address to 9
                               xb.AT_ConfigVal(String(“ATDL”), 8)       ‘ Set Destination Low
                                                                                    8

                               repeat                                   ‘ Main loop
                                 c := xb.rxCheck                        ‘ Check buffer
                                 if c <> -1                             ‘ If it’s not empty (-1)
                                   pst.Char(c)                          ‘ Then display the
                                                                                character

                                The receive program uses the same objects as the transmit program with the addition of
                             the Parallax Serial Terminal Plus object, which enables the display of the received data on the
                             laptop screen that is running the PSerT program. Figure 8.24 is a screenshot of the laptop
                             screen that is running the PSerT application for the data transmission test.



































                             Figure 8.24  XBee data transmission screenshot.
   231   232   233   234   235   236   237   238   239   240   241