Go to Post Everyone needs to start working with what they are given, and start appreciating FIRST, not complaining about what they think FIRST is doing wrong. - Marygrace [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 31-01-2008, 13:08
OMAR_567 OMAR_567 is offline
Registered User
FRC #2595
 
Join Date: Jan 2008
Location: Los Angeles
Posts: 4
OMAR_567 is an unknown quantity at this point
NEED HELP WITH PROGRAMMING

HEY
WE ARE A ROOKIE TEAM AND WE HAVE NO IDEA WHAT TO DO AND WE WANT TO SEE A SAMPLE CODE IN TELEOPARATED MODE ANY HELP????
  #2   Spotlight this post!  
Unread 31-01-2008, 13:38
iwin2000 iwin2000 is offline
Registered User
no team
 
Join Date: Dec 2007
Rookie Year: 2008
Location: CT
Posts: 23
iwin2000 has a spectacular aura aboutiwin2000 has a spectacular aura about
Re: NEED HELP WITH PROGRAMMING

Maybe you shouldn't yell and people would help.

But are you programming in EasyC or MPLAB?
  #3   Spotlight this post!  
Unread 31-01-2008, 13:40
OMAR_567 OMAR_567 is offline
Registered User
FRC #2595
 
Join Date: Jan 2008
Location: Los Angeles
Posts: 4
OMAR_567 is an unknown quantity at this point
Re: NEED HELP WITH PROGRAMMING

MY BAD WASNT TRYING TO YELL
WELL WE ARE USING MPLAB
  #4   Spotlight this post!  
Unread 31-01-2008, 13:44
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: NEED HELP WITH PROGRAMMING

Quote:
Originally Posted by OMAR_567 View Post
MY BAD WASNT TRYING TO YELL
WELL WE ARE USING MPLAB
Go download the default code. Open up user_routines and read the comments. It should have enough code to get your robot driving as is.
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
  #5   Spotlight this post!  
Unread 31-01-2008, 14:11
CardcaptorRLH85's Avatar
CardcaptorRLH85 CardcaptorRLH85 is offline
The master of the cards ^_^
AKA: Raa'Shaun H.
FRC #0322 (F.I.R.E. "Flint Inspires Real Engineers")
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Michigan, USA
Posts: 59
CardcaptorRLH85 is an unknown quantity at this point
Send a message via ICQ to CardcaptorRLH85 Send a message via AIM to CardcaptorRLH85 Send a message via MSN to CardcaptorRLH85 Send a message via Yahoo to CardcaptorRLH85
Re: NEED HELP WITH PROGRAMMING

In general when 'speaking' on the internet, using ALL CAPS is considered yelling. That's what iwin2000 was probably getting at.

By the way, the default code can be found near the bottom of the this page. It's labeled '2007 RC Code'. If I remember correctly, IFI hasn't released any different code for the 2008 season. If I'm wrong, someone will almost definitely correct me ^_^
__________________

  #6   Spotlight this post!  
Unread 31-01-2008, 14:52
OMAR_567 OMAR_567 is offline
Registered User
FRC #2595
 
Join Date: Jan 2008
Location: Los Angeles
Posts: 4
OMAR_567 is an unknown quantity at this point
Re: NEED HELP WITH PROGRAMMING

We have gone through the default code, but we are missing what the code means. We have someone to help us with C programming, but how do we define things so that they match up with physical layout on the robot control. Is there some manual that helps explain some of this. For example:

pwm01 = p1_y;
pwm02 = p2_y;
pwm03 = p3_y;
pwm04 = p4_y;
pwm05 = p1_x;
pwm06 = p2_x;
pwm07 = p3_x;
pwm08 = p4_x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;

The comments help in the program, but we need some more direction.
  #7   Spotlight this post!  
Unread 31-01-2008, 14:57
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: NEED HELP WITH PROGRAMMING

Take a look at the IFI user guide to the default code: http://www.ifirobotics.com/docs/lega...e-2004-1-7.pdf

Also see http://www.ifirobotics.com/docs/lega...2-apr-2004.pdf

Both are linked from the IFI webpage that CardcaptorRLH85 refered to.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #8   Spotlight this post!  
Unread 31-01-2008, 14:58
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: NEED HELP WITH PROGRAMMING

Programming reference guide:
http://www.ifirobotics.com/docs/lega...2-apr-2004.pdf

Default code reference guide:
http://www.ifirobotics.com/docs/lega...e-2004-1-7.pdf
__________________
Brian K
Team 1225 Robotics Mentor
  #9   Spotlight this post!  
Unread 31-01-2008, 15:06
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: NEED HELP WITH PROGRAMMING

Quote:
Originally Posted by OMAR_567 View Post
We have gone through the default code, but we are missing what the code means. We have someone to help us with C programming, but how do we define things so that they match up with physical layout on the robot control. Is there some manual that helps explain some of this. For example:

pwm01 = p1_y;
pwm02 = p2_y;
pwm03 = p3_y;
pwm04 = p4_y;
pwm05 = p1_x;
pwm06 = p2_x;
pwm07 = p3_x;
pwm08 = p4_x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;

The comments help in the program, but we need some more direction.
Basically what's going down below is that the pwm outputs on the robot controller are being mapped to the joystick inputs on the OI. So if you plug in a joystick to port 1 of the OI, and push it foward all the way, p1_y will be 255. This 255 on the Pwm01 will tell the speed controller to go +12V across the motor. Pulling it all the way back would give you a 0 on pwm01. This is a signal to go -12V for the speed controller(running a motor in reverse). When the joystick is at rest it is at a neutral value of 127.

So with what's setup below if you plug in joysticks to the OI in ports 1 and 2. Then plug in your speed controllers for your drive into PWMs 1 and 2. Then you should be able to drive your robot with 2 joysticks.


pwm01 = p1_y; //Map the y axis of joystick 1 to pwm01
pwm02 = p2_y; //Map the y axis of joystick 1 to pwm02
pwm05 = p1_x; //Map the x axis of joystick 1 to pwm01
pwm06 = p2_x; //Map the x axis of joystick 1 to pwm02
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
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
Need Help With Maplab C programming on serial communication loveheb3 Programming 0 04-06-2007 21:24
PLEASE HELP!! Need help programming arm?? amirjpl Programming 12 15-03-2007 15:11
Need help programming our swerve with feedback? activemx Programming 25 13-04-2004 07:29
need help with programming magical hands Programming 1 11-02-2004 22:12
Need help with programming Kori E. Programming 7 24-02-2003 21:21


All times are GMT -5. The time now is 20:28.

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