Go to Post To offer an opinion is fine, to demand that others adhere to your opinion is laughable. - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 25-01-2011, 20:40
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Encoder setDistancePerPulse()

So I hooked up our encoder and tried out both counter and encoder
all i essentially did was this:
Code:
roboInti{
sensor.start();
}
teleopPeriodic{
System.out.println(senser.getCount());
or
System.out.println(senser.getRate());
}
Now if I used a counter, I'd get crazy numbers. I'd run it for 5 seconds, and I'd get 448705 as my last number, which makes no sense.
If I used the getRate(), I get NaN
I'm assuming that I need to use setDistancePerPulse
I have the E4P, so what should I set as the distance per pulse?
__________________
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi