/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-x8/main.ino

  • Committer: Tim Marston
  • Date: 2013-11-27 20:16:06 UTC
  • Revision ID: tim@ed.am-20131127201606-ijpo0x0snjfoi6be
test/receiver/pulse-width-x8: updated comments and removed unused variable

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
//             R                    |    |                     R
21
21
//             ____________________ | __ | _____________________
22
22
//                                  |    |
23
 
//                  (int. 0) pin 2  o    o  pin 3 (int. 1)
 
23
//                           pin 2  o    o  pin 3
 
24
//                    (interrupt 0)        (interrupt 1)
24
25
//
25
 
// The two resistors in the circuit are pull-down resistors.  Without them, the
26
 
// Arduino is unable to read the pulse wave (I guess because of the diodes --
27
 
// it's fine without them!).
 
26
// The two resistors in the circuit are pull-down resistors (so, say 100kΩ).
 
27
// Without them, the Arduino is unable to read the pulse wave at all.
28
28
//
29
29
// (Note that on our receiver, and contrary to the above diagram, the channels
30
30
// are not actually sent in order.  Channels 2 and 3 are reversed.  To this end,
111
111
}
112
112
 
113
113
 
114
 
static int count_ = 0, good_ = 0;
115
 
 
116
 
 
117
114
bool read_channels( unsigned long channel_values[] )
118
115
{
119
116
        static unsigned long last_pulse_down = 0;