/elec/quadcopter

To get this branch, use:
bzr branch http://bzr.ed.am/elec/quadcopter

« back to all changes in this revision

Viewing changes to test/receiver/pulse-width/main.ino

  • Committer: Tim Marston
  • Date: 2013-11-13 22:39:08 UTC
  • Revision ID: tim@ed.am-20131113223908-0ohj8mmvdmqhzdku
updated comments in receiver tests

Show diffs side-by-side

added added

removed removed

7
7
// This program tries to measure the width of the signal pulses in
8
8
// microseconds.  It takes several measurements and prints it the average over
9
9
// serial.
10
 
//
11
 
// NOTES: Due to the way our receiver works (by varying the position of the
12
 
// rising edge of the pulse and keeping the falling edge fixed), it is
13
 
// sufficient for us to measure the pule width to determine the channel value
14
 
// (e.g., throttle position).  But it should be noted that this relies on a
15
 
// quirk of our receiver/transmitter and it is not truly measuring PPM.  Our
16
 
// next experiment is measuring PPM (../ppm-read).
 
10
 
17
11
 
18
12
// number of signal pulses to average
19
13
#define AVERAGE_SAMPLES 1