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

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


                              repeat
                                 xb1.Str(String(16, 1))

                                 FS.SetPrecision(7)
                                 fv := GPS.Float_Latitude_Deg             ‘ Get latitude
                                 If fv <> floatNaN
                                   xb1.Str(FS.FloatToString(fv))
                                 Else
                                   xb1.Str(String(“---”))

                                 xb1.Str(String(“ “))
                                 fv := GPS.Float_Longitude_Deg            ‘ Get longitude
                                 If fv <> floatNaN
                                   xb1.Str(FS.FloatToString(fv))
                                 Else
                                   xb1.Str(String(“---”))

                                 xb1.Str(String(“ “))
                                 fv := GPS.Float_Speed_Over_Ground        ‘ Get speed
                                 If fv <> floatNaN
                                   xb1.Str(FS.FloatToString(fv))
                                 Else
                                   xb1.Str(String(“---”))

                                 xb1.Str(String(“ “))
                                 fv := GPS.Float_Altitude_Above_MSL       ‘ Get altitude
                                 If fv <> floatNaN
                                   xb1.Str(FS.FloatToString(fv))
                                 Else
                                   xb1.Str(String(“---”))

                                 xb1.tx(13)
                                 WaitCnt(ClkFreq / 2 + ClkFreq / 4 + Cnt)

                             DAT
                                floatNaN       LONG $7FFF_FFFF            ‘ Means Not a Number

                             Mounting the Transmitter XBee Node
                             Figure 8.29 shows the front of the XBee transmitter node assembly. I wanted to use the XBee
                             SIP-mounting adapter but did not want to mount it vertically in a solderless breadboard.
                             I was concerned about the quadcopter vibrations shaking loose the somewhat top-heavy
                             XBee assembly. After a bit of thought, I came up with the configuration that you see in the
                             figure, where the SIP assembly is still plugged into a breadboard. However, the breadboard
                             itself is attached by foam-backed, double-sided tape to another breadboard that holds the
                             Mini. I also put a hidden spacer between the SIP adapter and the horizontal breadboard to
   241   242   243   244   245   246   247   248   249   250   251