View Single Post
  #13   Spotlight this post!  
Unread 13-04-2012, 22:03
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 470
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Encoder for Rpm help!

Quote:
Originally Posted by Ro13star View Post

public:
...
shooter_motor(3),
shooter_motor2(4),
left_shooter (3,4,false)

...

also can you use one pwm to a digital imput to get just the A channel from the encoder for rpm only. << is the current set up
I think that the problem you are having is a side effect of wiring only the A channel. I think that in order to get the encoder to work with just the A channel, you will need to ensure that it is a "1x" encoder. (Note that I've never tried this, we always hook up both the A and B channels, even if we are only using "1x" counting.) To use 1X counting, when you initialize the Encoder, you will need to use a line like the following:

Code:
left_shooter(3,4,false,CounterBase.EncodingType.k1X)
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"

Last edited by Ken Streeter : 13-04-2012 at 23:22. Reason: fixing "code" snippet to be properly indented
Reply With Quote