Go to Post What happens when everything becomes fully swagged out? Also, does my robot need to have collar-popping functionality to use every feature? - AlecMataloni [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-2008, 09:48
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Default Code error?

I loaded the new 08 default code to the robot, but it won't respond to the controllers and it will not respond when I give it a value of 255.

I read kevins post about upgrading the software to use the new code, but that just helped me to beable to load it to the bot.
I also noticed he removed the printf code.

how did other teams get their bot going?
and can someone tell me if I can add printf and how?

I just tried to program autonomys and I found that I am able to control the pwm(s) with static statements such as:
pwm=255

Last edited by Lakeeffect1674 : 02-02-2008 at 10:17.
  #2   Spotlight this post!  
Unread 02-02-2008, 12:44
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Default Code error?

in teleop.c, call:
Code:
Default_Routine();
that should set pwm01 to p1_y, pwm02 to p2_y, etc.
You can edit the function in ifi_code.c
Look in the forum for help for beginning programming, there are several threads in existence already
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #3   Spotlight this post!  
Unread 02-02-2008, 12:54
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Default Code error?

Printfs can be used in the code, just need to remember to end lines with \r\n to make sure you get a new line.

Last edited by psy_wombats : 02-02-2008 at 13:04.
  #4   Spotlight this post!  
Unread 02-02-2008, 12:55
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Default Code error?

Thanks for the reply,but does it matter where I put it?
I tried adding that code but I get an error

"Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Thread would not exit normally.
Could not read language tool output from pipe. (5)
A language-plugin exception occurred and was logged.
BUILD FAILED: Sat Feb 02 12:55:39 2008"
  #5   Spotlight this post!  
Unread 02-02-2008, 13:05
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Default Code error?

there are threads which tell you how to solve that. Use the search function to find them
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #6   Spotlight this post!  
Unread 02-02-2008, 13:15
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Default Code error?

Yeah thats what I have been doing for a few hours now.
I looked under beginning programming I can't find anything.
What else should I search for, cause I don't even know what to call my problem?
  #7   Spotlight this post!  
Unread 02-02-2008, 13:16
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Default Code error?

As far as I know there's been maybe one thread about this... And it wasn't really resolved. At least I haven't heard of this before.

Anyway, what version of mcc18 are you using? The build commands are a bit weird, (the disabling of the removement of unreachable code, and all the other minuses), but it doesn't look like that is causing an issue. Does this error still occur even without a printf? As this looks like a compiler issue.

And by default code, do you mean the FIRST default code or Kevin Watson's code?
  #8   Spotlight this post!  
Unread 02-02-2008, 13:19
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Default Code error?

I am using mcp18V 3.10 I think ( I read a post by kevin saying we needed to use it)

the default I am refering to is from kevin.
where can I get the FIRST default code? isn't it the same as kevins?

I commented out all printf because it didn't work and I just wanted to get the bot moving.
  #9   Spotlight this post!  
Unread 02-02-2008, 13:23
june_2008 june_2008 is offline
Registered User
AKA: Julia Filer
FRC #0547 (Fear)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Fayetteville, Tennessee
Posts: 28
june_2008 is an unknown quantity at this point
Re: Default Code error?

Where did you get 2008 default code? I looked on ifirobotics.com and couldn't find anything newer than 2007. I also looked on kevin.org and didn't see anything there that looked like '08 default code.
__________________
- 2006 St. Louis Regional Champions

2006 Galileo Division Finalists

"Those parts of the system that you can hit with a hammer are called hardware; those program instructions that you can only curse at are called software."
Anonymous
  #10   Spotlight this post!  
Unread 02-02-2008, 13:25
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Default Code error?

kevin.org/frc/

http://www.kevin.org/frc/ifi_frc_simple.zip


is there something else I should be using?
  #11   Spotlight this post!  
Unread 02-02-2008, 13:31
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Default Code error?

There really isn't a 2008 default code, so I suppose 'default' would be 2007's default code. The real difference is that it's only compatible with the 2.4 version, thus the topic title of the sticky. (Sorry, I'm not the most knowledgeable about the compiler...)

That looks right for Kevin's sensorless code, there are version available with the gyro and stuff, if you want it.
  #12   Spotlight this post!  
Unread 02-02-2008, 13:32
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Default Code error?

would you recomend sticking with the 07 code?
  #13   Spotlight this post!  
Unread 02-02-2008, 14:06
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Default Code error?

I don't think you should abandon Kevin's code yet, it really is very handy. However, bulky code that works is better than elegant code that doesn't. I'd save this as a last attempt.

What version of MPLAB are you using? There might a problem there, try reinstalling with 8.0+ or something. (I don't know MPLAB well either, just a thought.) And looking at the build stuff again... Do you have the include search path at C:\mcc18-3.10\h or similar? That's set by right clicking the project, (.mcp), selecting Build Options and using the Directories tab.
  #14   Spotlight this post!  
Unread 02-02-2008, 14:08
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Default Code error?

Quote:
Originally Posted by Lakeeffect1674 View Post
Thanks for the reply,but does it matter where I put it?
I tried adding that code but I get an error

"Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Thread would not exit normally.
Could not read language tool output from pipe. (5)
A language-plugin exception occurred and was logged.
BUILD FAILED: Sat Feb 02 12:55:39 2008"
This is a very strange error. Are you using Windows? What version of MPLAB are you using (not C18, which is different)?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #15   Spotlight this post!  
Unread 02-02-2008, 14:55
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Default Code error?

We added mcc 18 to the search path and it still did not work. Also we are using MPLAB 8 with Windows.
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
Error in code light on, trouble finding error Bryan Herbst Programming 16 12-10-2007 21:59
Problems integrating CMUCAM code and IFI Default Code Windward Programming 2 06-02-2007 16:48
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
user code to default code phoenixomega001 Programming 5 09-01-2005 00:09
Inserting Naviagation code into Default code? actorindp Programming 3 28-01-2004 18:12


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

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