Go to Post Pros of living in California from a Canadian standpoint: FRC on-field glass doesn't occasionally have shoe marks on it - Edxu [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-01-2014, 17:35
Frostivious's Avatar
Frostivious Frostivious is offline
Archmage
AKA: Zachary Boatman
FRC #1359 (Scalawags)
 
Join Date: Mar 2013
Rookie Year: 2012
Location: Albany
Posts: 8
Frostivious is an unknown quantity at this point
C++ Encoder Help Needed

So this is our first year using c++ and we were wondering if anyone could help us get encoders working. Things we need to know is how to get it to print to Smart Dashboard, well actually we just need help in general...
Reply With Quote
  #2   Spotlight this post!  
Unread 19-01-2014, 19:57
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: C++ Encoder Help Needed

for one, if I can ask, why do you need to print it to the dashboard? As to how else to use it, initialize it using the encoder class and check the WPI library for its functions. the main one's you need to know are .Get() which gives you the value, and .Reset() which resets the encoder.
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
  #3   Spotlight this post!  
Unread 19-01-2014, 20:31
phynix phynix is offline
Registered User
FRC #3130 (ERRORs)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Minnesota
Posts: 16
phynix is an unknown quantity at this point
Re: C++ Encoder Help Needed

You also need to Start() them, otherwise they won't begin counting.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-01-2014, 21:43
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: C++ Encoder Help Needed

Quote:
Originally Posted by phynix View Post
You also need to Start() them, otherwise they won't begin counting.
Yup, thats true. I was just working with gyros, totally forgot sensors needed to be initialized xD
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
  #5   Spotlight this post!  
Unread 19-01-2014, 21:51
Dinoyan Dinoyan is offline
Registered User
no team
Team Role: Electrical
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 62
Dinoyan is an unknown quantity at this point
Re: C++ Encoder Help Needed

Tutorials on C++ and Encoder (page 49)

http://first.wpi.edu/Images/CMS/Firs...ming_Guide.pdf
Reply With Quote
  #6   Spotlight this post!  
Unread 19-01-2014, 23:05
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: C++ Encoder Help Needed

Quote:
Originally Posted by Dinoyan View Post
Tutorials on C++ and Encoder (page 49)

http://first.wpi.edu/Images/CMS/Firs...ming_Guide.pdf
This document is quite old. The latest documentation is now at http://wpilib.screenstepslive.com/s/3120 (Getting Started with C++ and WPILib Programming). The encoder documentation is at http://wpilib.screenstepslive.com/s/...using-encoders
Reply With Quote
Reply


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 14:00.

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