Go to Post It's a FIRST thing. You gots to understand. - Koko Ed [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
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 17-02-2009, 23:03
astephen68's Avatar
astephen68 astephen68 is offline
Build, Scout, Drive
AKA: Stephen
VRC #0478 (Mustang Robotics)
Team Role: Scout
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Alexander Mackenzie High School
Posts: 332
astephen68 is just really niceastephen68 is just really niceastephen68 is just really niceastephen68 is just really nice
[FTC]: Encoders

Does anybody have any sample code for encoders that i can take a look at. Thanks if you do.
__________________
2008-2009
Soutern Ontario Championship
-Finalists
-Winners of the Drivers Challenge
Ontario Championship
-Finalists


Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2009, 08:43
gdo's Avatar
gdo gdo is offline
Never too much duct-tape ;)
AKA: Patrick
FTC #0001 (Team Unlimited)
Team Role: Engineer
 
Join Date: Dec 2005
Rookie Year: 2001
Location: MA
Posts: 131
gdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to behold
Send a message via AIM to gdo Send a message via MSN to gdo
Re: [FTC]: Encoders

Which language?

If you are using RobotC, this will work

Quote:
nMotorEncoder[YOUR_MOTOR1_HERE] = 0;
nMotorEncoder[YOUR_MOTOR2_HERE] = 0;
nMotorEncoderTarget[YOUR_MOTOR1_HERE] = X_Distance;
nMotorEncoderTarget[YOUR_MOTOR2_HERE] = X_Distance;
motor[YOUR_MOTOR1_HERE] = 100;
motor[YOUR_MOTOR2_HERE] = 100;
Just substitute "YOUR_MOTOR1_HERE" and "YOUR_MOTOR2_HERE" for the names of the motors you are using, and then substitute "X_Distance" for the number of rotations you want to travel.
__________________



FTC #1: http://unlimited.syraweb.org

Got any question for me; AIM, MSN or PM me
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2009, 12:32
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
Re: [FTC]: Encoders

I don't think you need to do the motor[motorname] = 100;, I think the encoders already go to the target encoder positions.

Is that right?
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2009, 12:36
ShawnH ShawnH is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 7
ShawnH is an unknown quantity at this point
Re: [FTC]: Encoders

You still need to motor[motorname] = 100;. nMotorEncoderTarget[] does not move the motor. It only set the target.
Reply With Quote
  #5   Spotlight this post!  
Unread 18-02-2009, 15:19
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
Re: [FTC]: Encoders

Oh..really...what happens when the encoders reach the target position?
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
Reply With Quote
  #6   Spotlight this post!  
Unread 18-02-2009, 16:32
ShawnH ShawnH is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 7
ShawnH is an unknown quantity at this point
Re: [FTC]: Encoders

The motors should just stop.
Reply With Quote
  #7   Spotlight this post!  
Unread 18-02-2009, 22:43
astephen68's Avatar
astephen68 astephen68 is offline
Build, Scout, Drive
AKA: Stephen
VRC #0478 (Mustang Robotics)
Team Role: Scout
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Alexander Mackenzie High School
Posts: 332
astephen68 is just really niceastephen68 is just really niceastephen68 is just really niceastephen68 is just really nice
Re: [FTC]: Encoders

I want to know how to use encoders on an arm in and out of autonomous. I have gotten it to go up but its not reconizing a second button in robotc what should i do
__________________
2008-2009
Soutern Ontario Championship
-Finalists
-Winners of the Drivers Challenge
Ontario Championship
-Finalists


Reply With Quote
  #8   Spotlight this post!  
Unread 19-02-2009, 09:53
gdo's Avatar
gdo gdo is offline
Never too much duct-tape ;)
AKA: Patrick
FTC #0001 (Team Unlimited)
Team Role: Engineer
 
Join Date: Dec 2005
Rookie Year: 2001
Location: MA
Posts: 131
gdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to beholdgdo is a splendid one to behold
Send a message via AIM to gdo Send a message via MSN to gdo
Re: [FTC]: Encoders

Can you post what code you have so far?
__________________



FTC #1: http://unlimited.syraweb.org

Got any question for me; AIM, MSN or PM me
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FTC]: Problems with Motor Encoders? FTC 2891 FIRST Tech Challenge 2 16-02-2009 19:03
[FTC]: Tips page on using FTC Encoders with LabVIEW PhilBot FIRST Tech Challenge 7 27-01-2009 14:00
[FTC]: FTC read encoders vi Jim.D FIRST Tech Challenge 8 26-12-2008 23:42
[FTC]: Progress report on using encoders PhilBot FIRST Tech Challenge 11 14-11-2008 14:01
[FTC]: [FTC]: Ontario Provincial FTC Start/End Times cbhl FIRST Tech Challenge 8 16-12-2007 13:37


All times are GMT -5. The time now is 18:03.

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