Go to Post [This year's game manual contains] 46 new pages of pictures displaying how to attach bumpers, assuring at least 15% of teams almost get it right this time. - PayneTrain [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 29-01-2008, 11:29
bilal1219's Avatar
bilal1219 bilal1219 is offline
Registered User
AKA: Bilal
FRC #1219 (Iron Eagles)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Canada
Posts: 56
bilal1219 is an unknown quantity at this point
Question Please help with some questions~new programmer

We entered the default code. When we do forward, only port 1 y goes to 255, and port x goes up to 130. When we put the joystick on an angle, it goes forward. Same with backward. Can anyone tell me the problem?
For the geartooth sensor, I got the default code. But I cant locate where to write the code for it.
Someone please help.
Thank you
__________________


<a href="http://www.thebluealliance.net/tbatv/team.php?team=1219" style="border: 0"><img src="http://www.thebluealliance.net/tbatv/teambadge/gen/1219/FF3300/0066FF/teambadge.png" alt="Team 1219" /></a>

Robots Might Lose But Teams Never Do
  #2   Spotlight this post!  
Unread 29-01-2008, 11:43
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,169
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Please help with some questions~new programmer

Off the top of my head it sounds like you are using tank drive mode with 2 joysticks. So the left and right motors are controlled by the y axis of 2 joysticks.

What gear tooth code do you have? Where did you get it? In general, the gear tooth sensor is hooked up to a digital input that generates an interrupt and you count the number of teeth passing by with each interrupt. So there are two pieces of the code, one in an interrupt context and another in your user routines that accesses and uses the count. But we need a little more information to be able to help you.

HTH
  #3   Spotlight this post!  
Unread 29-01-2008, 11:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Please help with some questions~new programmer

For your joystick issue, I'm not sure what you mean. Can you describe the problem again in more detail? Tell us which joystick you are using, where it's connected, when you get the values you're seeing, how you're determining what the values are, and what you mean by "on an angle" and "goes forward".

Code for using the gear tooth sensor isn't readily available in a "plug and play" form, but it's easy to change what is available. Grab a copy of Kevin Watson's encoder code from his web site, follow the directions for installing it into your MPLab project, configure the sensors for digital inputs 1 and 2, and remove the test for the Phase B signal level from the interrupt service routine. You want it always to increment the count when the interrupt occurs.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
NEW PROGRAMMER!!!!! NEED HELP!!!! delphi demon Programming 5 19-04-2007 13:22
Help with programming new controllers, please. Oumonkey Programming 6 30-11-2006 21:53
pic: The programmer needs some alone time with the robot! Karthik1 Extra Discussion 7 23-02-2005 10:35
hey need some help with writing a code please help me here magical hands Programming 9 01-01-2004 21:46
Help for New Programmer Mike375 Programming 3 27-09-2001 09:04


All times are GMT -5. The time now is 09:23.

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