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

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










                             Figure 7.21  Transistor driver circuit.

                             the special characters used to create the schematic do not copy over using the Word program’s
                             copy and paste functions. Figure 7.21 shows a screenshot of the schematic portion.

                             {{
                             LED_Control
                             D.J. Norris  (C) 2013
                             This program sets the LED lighting mode for the four LED strips
                             attached to the underside of the Elev-8 booms. The mode is selected
                             based upon the Flap switch position on the Spektrum DX-8 R/C
                             transmitter.
                             The three possible positions with associated modes and pulse widths
                             are:

                             Position                 Mode                     Pulse Width
                                0          Flash front boom LEDs only           1.899 ms
                                1          Flash all LEDs                       1.505 ms
                                2          No LEDs are lit or flashed           1.111 ms

                             Driver schematic

                             See Figure 7.21, since as already mentioned, Word copy/paste does
                             not work with the special characters used to create the Spin
                             documentation schematic.

                             }}

                             CON
                             RIGHT_FRONT = 1
                             LEFT_FRONT  = 2
                             RIGHT_REAR  = 3
                             LEFT_REAR   = 4
                             WAIT_CNT    = 40_000_000
                             RIGHT_FRONT_PIN = 5
                             LEFT_FRONT_PIN  = 6
                             RIGHT_REAR_PIN  = 7
                             LEFT_REAR_PIN   = 8

                             VAR


                               long  stack[20]
   198   199   200   201   202   203   204   205   206   207   208