Go to Post There's nothing that you can do to please everyone. You have to figure out where you stand and hold your ground. - sciguy125 [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 15-01-2006, 14:38
Team 1649 Team 1649 is offline
Registered User
#1649
 
Join Date: Feb 2005
Location: Florida
Posts: 2
Team 1649 is an unknown quantity at this point
EasyC Default Code

Our software team was looking to find the default code to EasyC. We don't know if there is one, one of our mentor's does think there is one. Can anyone reffer us on where to get it?
  #2   Spotlight this post!  
Unread 15-01-2006, 17:08
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: EasyC Default Code

There really isn't a "Default" code. What you do is open EasyC, then click on the button that looks like the FIRST logo. "New Competion Template". Click that and that is what is called the default code.

Then you start programming your drive functions in OperatorControl. Make sure you put a while loop in there first, then put your code inside the while loop.


I highly recommend that you download and watch this video:

Link to Videos
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #3   Spotlight this post!  
Unread 15-01-2006, 20:21
intelitek_Chris intelitek_Chris is offline
Registered User
no team
 
Join Date: Dec 2005
Location: Manchester
Posts: 19
intelitek_Chris will become famous soon enoughintelitek_Chris will become famous soon enough
Re: EasyC Default Code

As Chakorules already explained, there is no 'default' code. All the code you will need for your robot you can write yourself. This may sound difficult, but it's really quite simple. There are 7 tutorials in the help file that will lead you from RC programming, to running with the camera autonomously. Each of these tutorials has a saved project in the tutorials folder that you can open to view the end result of the tutorial.
  #4   Spotlight this post!  
Unread 19-01-2006, 00:56
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC Default Code

I am digging the EasyC software. A couple of questions, though, that I haven't figured out yet. So for the gyro sensor, I understand it is set up for the kit gyro. What if we are using a 300 deg/sec gyro? Is there any way of changing the gyro code? Is it integral to the WPLib? I think I remember reading somewhere else that it is proprietary or a portion is proprietary to other software so we can't have the source right? Now Kevin Watson has got some very nice code for gyros (amongst a bajillion other things) that can be used. How can we import other C files? It would be nice to take Kevin's code and make an EasyC library, I just can't seem to figure it out though.
  #5   Spotlight this post!  
Unread 19-01-2006, 14:28
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: EasyC Default Code

EasyC should work fine with any gyro you hook to it.

If it doesn't please post.

Last edited by Kingofl337 : 19-01-2006 at 14:35.
  #6   Spotlight this post!  
Unread 19-01-2006, 21:50
BrianBSL BrianBSL is offline
Registered User
FRC #0190
 
Join Date: Sep 2004
Rookie Year: 2000
Location: Worcester, MA
Posts: 251
BrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud of
Re: EasyC Default Code

I would take a guess that it would work, but the units would be incorrect. The kit gyro has an output sensitivity of 12.5mV per degree, you will have to compare this to whatever gyro you are using, and scale it correctly.

For refrence, an Analog Devices ADXRS300 has an output of 5mV per degree. This means that you need to edit: multiply (not divide) the number you get from easyC by 2.5 (12.5 mV / 5 mV) in order to get real degrees.

Brad would know for sure, but I think that is how it works.
__________________
My posts represent my personal views only, and do not represent the views of either my team, Team 190, nor its primary sponsor, Worcester Polytechnic Institute.

Last edited by BrianBSL : 19-01-2006 at 23:59.
  #7   Spotlight this post!  
Unread 19-01-2006, 23:02
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC Default Code

Quote:
Originally Posted by BrianBSL
I would take a guess that it would work, but the units would be incorrect. The kit gyro has an output sensitivity of 12.5mV per degree, you will have to compre this to whatever gyro you are using, and scale it correctly.

For refrence, an Analog Devices ADXRS300 has an output of 5mV per degree. This means that you need to divide the number you get from easyC by 2.5 (12.5 mV / 5 mV) in order to get real degrees.

Brad would know for sure, but I think that is how it works.

Hmmm sort of sounds right, but wouldn't you have to multiply? For instance, say the robot moves 1 degree...with the 80 you would get 12.5 mV and with the 300 you would get 5 mV. If the gyro code is unchanged then it would return a value 2.5 less than the real value (12.5/5) which means you would have to multiply to achieve the correct heading. Or am I having a brain fart?
  #8   Spotlight this post!  
Unread 19-01-2006, 23:05
BrianBSL BrianBSL is offline
Registered User
FRC #0190
 
Join Date: Sep 2004
Rookie Year: 2000
Location: Worcester, MA
Posts: 251
BrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud ofBrianBSL has much to be proud of
Re: EasyC Default Code

Quote:
Originally Posted by TubaMorg
Hmmm sort of sounds right, but wouldn't you have to multiply? For instance, say the robot moves 1 degree...with the 80 you would get 12.5 mV and with the 300 you would get 5 mV. If the gyro code is unchanged then it would return a value 2.5 less than the real value (12.5/5) which means you would have to multiply to achieve the correct heading. Or am I having a brain fart?
Heh. Yah, I meant multiply. I guess I was having the brain fart.
__________________
My posts represent my personal views only, and do not represent the views of either my team, Team 190, nor its primary sponsor, Worcester Polytechnic Institute.
  #9   Spotlight this post!  
Unread 19-01-2006, 23:27
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC Default Code

Cool, well thanks for the idea we will try it out. I would rather fix it at the front end, but if this works, good enough! I just want to make sure our kids are able to use EasyC since they have ZERO programming experience. Although they did whip up a "Hello World!" program today!
  #10   Spotlight this post!  
Unread 20-01-2006, 05:07
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: EasyC Default Code

Quote:
Originally Posted by TubaMorg
Cool, well thanks for the idea we will try it out. I would rather fix it at the front end, but if this works, good enough! I just want to make sure our kids are able to use EasyC since they have ZERO programming experience. Although they did whip up a "Hello World!" program today!
You can write a user function to do the scaling and call that rather than using the GetGyroAngle block.

If I can get one and put it into WPILIb, then we might be able to do an EasyC version with it. We'll do a post if we can do it.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #11   Spotlight this post!  
Unread 20-01-2006, 10:12
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC Default Code

Quote:
Originally Posted by BradAMiller
You can write a user function to do the scaling and call that rather than using the GetGyroAngle block.

If I can get one and put it into WPILIb, then we might be able to do an EasyC version with it. We'll do a post if we can do it.

That sounds great, although if it's just a matter of scaling it should be no problem (I hope). We are building our robot chassis/drive similar to last year (2wd with casters) that is able to spin pretty fast which makes me concerned that the KOP gyro will over-range, thus we want to use the 300 deg/sec model. I will post when we try it out and see how it works with EasyC. Should be within the next week.
  #12   Spotlight this post!  
Unread 20-01-2006, 16:30
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: EasyC Default Code

There is also a 150 deg/sec from the same manufacturer as the unit in the KOP. That is plug and play compatible with the one in the KOP.
  #13   Spotlight this post!  
Unread 20-01-2006, 23:55
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC Default Code

Quote:
Originally Posted by Kingofl337
There is also a 150 deg/sec from the same manufacturer as the unit in the KOP. That is plug and play compatible with the one in the KOP.

Yeah I believe our 300 deg/sec one is from the same manufacurer too so all is good in theory land!
  #14   Spotlight this post!  
Unread 29-01-2006, 11:52
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC Default Code

Quote:
Originally Posted by TubaMorg
Yeah I believe our 300 deg/sec one is from the same manufacurer too so all is good in theory land!

UPDATE: We mounted our 300 deg/sec rate gyro from Analog Devices and used the EasyC gyro code successfully. As previously discussed, multiplying the final output from EasyC by 2.5 gives the correct heading (in tenths of a degree). It works very well!
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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Best Way To Insert Autonomous Code Into Default then load help.? :-)? gemccnp Programming 2 05-02-2005 18:58
default code vs. 2.4 stephenthe1 Programming 2 05-02-2005 18:02
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 01:34.

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