Page 194 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 194
Chapter 7: Ser v o Motors and Extending the Ser v o Control System 173
Figure 7.17 Start of the RX_demo program in the PSerT.
Below is the RX_demo program listing for which I have included the original
documentation as well as my own comments to help clarify the program’s functioning.
{{
*****************************************
* RX Demo version 1.4 *
* Author: Rich Harman *
* Copyright (c) 2009 Rich Harman *
* See end of file for terms of use. *
*****************************************************************
Read RC inputs on 3 pins, output same values on 3 more pins
*****************************************************************
Coded by Rich Harman 15 Jul 2009
*****************************************************************
Thanks go to Sam Mishal for his help getting the counters to work
*****************************************************************
Modified by D. J. Norris 20 Sep 2013
*****************************************************************
Theory of Operation:
Launch three cogs using the object RX which in turn starts two
counters. This approach does NOT need the pulses to arrive on the
pins in any certain order, nor does it require the pins to be all
connected. Whatever pulse is received on pin 14 is then sent out to
pin 1 and so on.
}}