Go to Post So the bar is set insanely high. Probably unachievably high for some of us. But what a shame it would be to lower it. - pfreivald [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 3 votes, 3.67 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-04-2012, 15:09
Ro13star Ro13star is offline
Registered User
FRC #0832
 
Join Date: Apr 2012
Location: roswell
Posts: 3
Ro13star is an unknown quantity at this point
Encoder for Rpm help!

Hi, i am a new programmer for my team and i am having problems with using the data from the encoder in the program. i have confirmed the encoder works with a multi-meter. the encoder is a us Digital e4p.
this is the relevant part of my code please help:

class RobotOscar : public IterativeRobot
{
// RobotDrive myRobotDrive; // robot drive system

Jaguar shooter_motor;
Jaguar shooter_motor2;
Encoder left_shooter;
double count;

public:
RobotOscar(void):


shooter_motor(3),
shooter_motor2(4),
left_shooter (3,4,false)

...
...
void TeleopInit(void) {
printf("Telop Init Entry\n");
left_shooter.Start();
left_shooter.Reset();
}
...
...
void TeleopContinuous(void)
{



while(IsEnabled() && IsOperatorControl()){
count=left_shooter.Get();


printf("count= %f \n", count);

}
}
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
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 17:37.

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