|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|