Changes between Version 11 and Version 12 of ControlSystems/SoftwareTeam/Training/GettingStarted/Encoders


Ignore:
Timestamp:
Oct 31, 2019, 1:16:07 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/Encoders

    v11 v12  
    2727    leftEncoder.reset();
    2828  }}}
    29 * In robotPeriodic() read and display the encoder valuey
     29* In robotPeriodic() read and display the encoder value
    3030  {{{
    3131    int encoderValue = leftEncoder.getRaw();
     
    6969[[Image(encAB.gif,right,250px,margin=10)]]Notice that the raw count reports the sum of both A and B channels of the quadrature encoder.  A quadrature encoder works like the optical encoder shown above, but with two rows of slits in the disk, each slightly offset from the other (overlapping) and each with its own light source/detector.  This allows you to determine not just distance and speed but also direction.  The light detectors are labeled A and B; because the slots overlap, the sequence of detected light as the wheel rotates forward is:  A, AB, B, off, A, AB, etc.  When the wheel rotates backwards, the sequence is B, AB, A, off, B, AB, A, off. 
    7070
    71 You can read more about quadrature encoders [https://robu.in/quadrature-encoder/ here] [[Image(quadEncoder.gif,right,250px,margin=10)]]
     71You can read more about quadrature encoders [https://robu.in/quadrature-encoder/ here] [[Image(quadEncoder2.gif,right,250px,margin=10)]]
    7272
    7373