|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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. Last edited by BrianBSL : 19-01-2006 at 23:59. |
|
#7
|
|||
|
|||
|
Re: EasyC Default Code
Quote:
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
|
|||
|
|||
|
Re: EasyC Default Code
Quote:
|
|
#9
|
|||
|
|||
|
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
|
|||
|
|||
|
Re: EasyC Default Code
Quote:
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. |
|
#11
|
|||
|
|||
|
Re: EasyC Default Code
Quote:
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
|
||||
|
||||
|
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
|
|||
|
|||
|
Re: EasyC Default Code
Quote:
Yeah I believe our 300 deg/sec one is from the same manufacurer too so all is good in theory land! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |