Go to Post If you have to build the best robot to be inspired then we end up with one winning inspired team, and 999 losers. That is not the spirit of FIRST. - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2015, 15:31
Pike3543's Avatar
Pike3543 Pike3543 is offline
Coder
AKA: Connor
FRC #3543 (C4 Robotics)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Arnprior, ON
Posts: 9
Pike3543 is an unknown quantity at this point
Any Code needed for an Encoder Sensor

I'm looking to get a AS5304 working for our bot but I'm not sure if any code is needed and overall how to get a signal from it. Anything important I should know?
  #2   Spotlight this post!  
Unread 02-02-2015, 15:51
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,679
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Any Code needed for an Encoder Sensor

Code will definitely be required. The form is very much dependent on which language you're programming your robot in. For Java or C++, you would extend the Encoder class or the CounterBase class, depending on whether you're interested in measuring speed/RPMs or distance/angle of rotation.
  #3   Spotlight this post!  
Unread 02-02-2015, 16:04
Pike3543's Avatar
Pike3543 Pike3543 is offline
Coder
AKA: Connor
FRC #3543 (C4 Robotics)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Arnprior, ON
Posts: 9
Pike3543 is an unknown quantity at this point
Re: Any Code needed for an Encoder Sensor

I'm looking for distance and to just overall get some sort of reading from it.
I'm using C++. Is there any example code I could use and customize to do what I want it to.
  #4   Spotlight this post!  
Unread 02-02-2015, 16:34
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Any Code needed for an Encoder Sensor

Quote:
Originally Posted by Pike3543 View Post
I'm looking for distance and to just overall get some sort of reading from it.
I'm using C++. Is there any example code I could use and customize to do what I want it to.
The code you want is in WPILib.

http://wpilib.screenstepslive.com/s/...or-other-shaft



Last edited by Ether : 02-02-2015 at 16:38.
  #5   Spotlight this post!  
Unread 02-02-2015, 21:50
Pike3543's Avatar
Pike3543 Pike3543 is offline
Coder
AKA: Connor
FRC #3543 (C4 Robotics)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Arnprior, ON
Posts: 9
Pike3543 is an unknown quantity at this point
Re: Any Code needed for an Encoder Sensor

Thanks this is very helpful
Closed Thread


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 21:09.

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