Go to Post Thinking (or the lack of it) will be our downfall. - sirbleedsalot [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 12-01-2008, 11:23
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
Re: SetPWM and our IR controls

It appears that that may work, except there is no such function as SetPWM in Kevin's code. Instead, use:
Code:
pwm01 = 65;
pwm02 = 192;
So your code appears to do one thing: if the first programmed IR signal is sent, drive forward forever (or spin forever, depending on how your motors are mounted). That sounds a little dangerous for a first test unless your robot is off the ground. I suggest having a signal to stop the robot as well.
__________________
Old stuff:

FRC 2007 Strategy Solver. Version: 2.55. Progress: done.
  #2   Spotlight this post!  
Unread 12-01-2008, 11:25
Vanquish Vanquish is offline
Registered User
no team
 
Join Date: Jan 2008
Rookie Year: 1980
Location: Somewhere
Posts: 19
Vanquish is an unknown quantity at this point
Re: SetPWM and our IR controls

Quote:
Originally Posted by ham90mack View Post
It appears that that may work, except there is no such function as SetPWM in Kevin's code. Instead, use:
Code:
pwm01 = 65;
pwm02 = 192;
So your code appears to do one thing: if the first programmed IR signal is sent, drive forward forever (or spin forever, depending on how your motors are mounted). That sounds a little dangerous for a first test unless your robot is off the ground. I suggest having a signal to stop the robot as well.
Yea, I realize that I just wanted to know if the format looked alright, thanks
  #3   Spotlight this post!  
Unread 12-01-2008, 15:10
taggartbg taggartbg is offline
Registered User
FRC #1712 (Dawgma)
Team Role: Electrical
 
Join Date: May 2005
Rookie Year: 2006
Location: Lower Merion, PA
Posts: 38
taggartbg will become famous soon enoughtaggartbg will become famous soon enough
Send a message via AIM to taggartbg Send a message via MSN to taggartbg Send a message via Yahoo to taggartbg
Re: SetPWM and our IR controls

Hey guys, thanks for the help, I think i'm getting there; however, I'm still having some struggles.

I'm begining to think that I'm just doing something really simple wrong. Here is the process I undergo to test my code.

1) Code in easyC Pro in the OperatorControl function (I've also tried in Autonomous)
2) Power up robot
3) Hold down "prog" until the "Program Status" LED turns a solid orange
4) In easyC, I hit Build & Download
5) Once it is loaded, I power down the bot
6) When I power it back up, the code should automatically execute, yes?
  #4   Spotlight this post!  
Unread 12-01-2008, 15:17
Branden Ghena's Avatar
Branden Ghena Branden Ghena is offline
Previously: tawnos23
FRC #0240 (TEMPEST)
Team Role: College Student
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Houghton, Michigan (MTU)
Posts: 303
Branden Ghena has a spectacular aura aboutBranden Ghena has a spectacular aura aboutBranden Ghena has a spectacular aura about
Re: SetPWM and our IR controls

Do you have a operator interface hooked up?
__________________
Branden Ghena - Michigan Tech Student and Team 240 Alumnus
Working Towards: Electrical Engineering and Computer Engineering Double Major

"All we have to decide is what to do with the time that is given to us." - Gandalf
  #5   Spotlight this post!  
Unread 12-01-2008, 15:29
laultima laultima is offline
Registered User
FRC #1458 (Danvillans)
Team Role: Alumni
 
Join Date: Feb 2007
Rookie Year: 2005
Location: Danville, CA
Posts: 87
laultima is on a distinguished road
Send a message via AIM to laultima
Re: SetPWM and our IR controls

Quote:
Originally Posted by tawnos23 View Post
Do you have a operator interface hooked up?
you do need the OI connected to the RC either by radio or tether before the code will run
__________________
2007 Davis/Sacramento Regional Winner (100, 997, 1458)

2008 Davis/Sacramento Regional Gracious Professionalism Award Winner

  #6   Spotlight this post!  
Unread 12-01-2008, 15:24
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: SetPWM and our IR controls

Make sure you put your OperatorControl function inside the main function.
And I don't think you have to power down your robot, it should automaticly work well.
Make sure you are not programming in competition mode (when it's divided to 3 functions). 'Cause that way I don't think it can work (I think it only works when you are in a competition [when the competition port on the OI is connected]).
Just to the following:
1) Open a regular new EasyC pro project.
2) Make your OperatorControl function (in the user functions).
3) Drag and drop the OperatorControl function you just made into a while(1) loop in the main function.
4) Power up the robot.
5) Hold down "prog" until "Program Status" LED turns orange.
6) Press Build and Download in EasyC pro.
7) Now it should work

I suggest you first build and download a simple program (like putting your motor in half speed) and check if it works well.
Again, check if the PWM cables are connected to the victor that is connected to the motor you want to activate.
Hope it helped.
Team 2217
__________________
2007 Israel Regional GM/Technion Rookie Allstars
Participated in 2007 Atlanta World Championships (Newton Division)

Last edited by itsme : 12-01-2008 at 15:36.
  #7   Spotlight this post!  
Unread 12-01-2008, 15:33
taggartbg taggartbg is offline
Registered User
FRC #1712 (Dawgma)
Team Role: Electrical
 
Join Date: May 2005
Rookie Year: 2006
Location: Lower Merion, PA
Posts: 38
taggartbg will become famous soon enoughtaggartbg will become famous soon enough
Send a message via AIM to taggartbg Send a message via MSN to taggartbg Send a message via Yahoo to taggartbg
Re: SetPWM and our IR controls

AHH! I've been creating competition projects ...I'll post back when I get a chance to create a standalone and try it out.

Thanks again.
  #8   Spotlight this post!  
Unread 12-01-2008, 15:35
Branden Ghena's Avatar
Branden Ghena Branden Ghena is offline
Previously: tawnos23
FRC #0240 (TEMPEST)
Team Role: College Student
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Houghton, Michigan (MTU)
Posts: 303
Branden Ghena has a spectacular aura aboutBranden Ghena has a spectacular aura aboutBranden Ghena has a spectacular aura about
Re: SetPWM and our IR controls

A competition program will work if you plug a switch into the competition port that enables the robot.
__________________
Branden Ghena - Michigan Tech Student and Team 240 Alumnus
Working Towards: Electrical Engineering and Computer Engineering Double Major

"All we have to decide is what to do with the time that is given to us." - Gandalf
  #9   Spotlight this post!  
Unread 12-01-2008, 15:42
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: SetPWM and our IR controls

Quote:
Originally Posted by tawnos23 View Post
A competition program will work if you plug a switch into the competition port that enables the robot.
Oh sorry, forgot about that..
But I'm guessing taggartbg didn't do that either (correct me if I'm wrong).
__________________
2007 Israel Regional GM/Technion Rookie Allstars
Participated in 2007 Atlanta World Championships (Newton Division)
  #10   Spotlight this post!  
Unread 14-01-2008, 18:35
taggartbg taggartbg is offline
Registered User
FRC #1712 (Dawgma)
Team Role: Electrical
 
Join Date: May 2005
Rookie Year: 2006
Location: Lower Merion, PA
Posts: 38
taggartbg will become famous soon enoughtaggartbg will become famous soon enough
Send a message via AIM to taggartbg Send a message via MSN to taggartbg Send a message via Yahoo to taggartbg
Re: SetPWM and our IR controls

Hey everybody,

Thanks for all you're help, our code is up and functional now, thank you

/Taggart
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
help us program our controls dude_brd Programming 1 10-02-2007 12:02
need help on programing our controls dude_brd Programming 1 07-02-2007 18:42
FRC: Reset and Program Controls yanksrock777 General Forum 4 24-01-2007 22:37
Push Button and Switch Suppliers for OI controls Goldberg204 Control System 8 11-01-2007 15:27
pic: 383`s controls and driver Manoel Robot Showcase 13 03-03-2005 00:57


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

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