Go to Post Let's see. There's the Dean of Students, the Dean of Admissions, The Dean of Engineering, and the Dean of Kamen? Sometimes known as the Denim Dean. - Bill_B [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 13-01-2015, 17:30
HTTMonado HTTMonado is offline
Registered User
FRC #1389
 
Join Date: Jan 2015
Location: Maryland
Posts: 1
HTTMonado is an unknown quantity at this point
E4P Encoders not workind

Our encoders don't return any value when I used the Encoder class (C++ WPIlib.) Here's what I have to configure and read the encoder.

I ended up straight up copying the example code from the WPIlib documentation

We have confirmed that the encoders are on the correct digital input on the robot rio.

Code:
Encoder *leftEncode;	
leftEncode = new Encoder(6, 7, false, Encoder::k4X);

leftEncode->SetMaxPeriod(.1);
leftEncode->SetMinRate(10);
leftEncode->SetDistancePerPulse(5);
leftEncode->SetReverseDirection(true);
leftEncode->SetSamplesToAverage(7);

SmartDashboard::PutNumber("Encoder One value", leftEncode->GetRate());
 


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 02:38.

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