Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What is Easy C good for? (http://www.chiefdelphi.com/forums/showthread.php?t=52712)

Doug Leppard 26-01-2007 07:15

Re: What is Easy C good for?
 
Quote:

Originally Posted by Kingofl337 (Post 565433)
We are getting ready to release an update to easyC PRO that allows you to select which gyro your are using 80, 150, or 300. Also allows for adjusting the dead band.

Also, you can send anything you want to the camera. If you look in API.h you will see WriteSerialPortTwo(unsigned char). You can send any message you want to the camera. Brad also added a feature to WPILIB to make that even easier. Namely the ability to create virtual blinders for the camera to shut off sections of the CCD to ignore a items from the field of view.

I honestly don't believe that there is anything you can't do in easyC that is applicable to FIRST other than a "Because I Can" type item.

Fantastic, we look forward to seeing the updates. We have a strong programming team of professional adult programmers, college programmers and high school programmers.

They are all liking easyc pro because we can do such fast development. In one Saturday we developed robots driving up to the light, wall following and top secret thing to allow us to place the ring on the spider leg. We are using it to develop the tools we need to when we put the final product together.

So keep up the good work, team 1902 congratulates you. Tell this thread when the updates are ready.

d.courtney 08-02-2007 19:57

Re: What is Easy C good for?
 
I am one of those programmers that "switched" so to speak, last year I was really skeptical of it and in fact I swore I would never touch the thing. This year I really don't know what prompted me to try it but I did, and the speed at which I could do what I did last year was phenomenal. I do miss the joy of coding on MPLAB, but I think that joy has been outweighed by the sheer quickness of easyC pro... and its not just for rookies, you can do just as much with easyC as MPLAB (name one thing you can't and I'll give my best shot at it).

Stuart 08-02-2007 20:19

Re: What is Easy C good for?
 
ok here is the thing. any thing you can do in MP lab I can do in easyC . . and Ill do in in 1/10 the time. its also alot easier to show some one easyC flowcharts than to try to explain 100+ lines of C.

I dont use easyC because Im not an experienced coder(3rd year CS/EE student) I use easy C because I want it done now, and not 2 days from now. yes I could deal with all the stress of getting gyro bias or messing with kevins camera code(btw with EasyC you could plug your servos in to the camera board and not have to run 2 more wires to the RC), then trying to get the gyro code and the camera code and the gear tooth sensor code working together. Or I can just drop in a camera block, a gyro block and a geartooth block, and have it all up and running in 5 min.

the real thing here is easyC is different than what youve been doing before. but if you give it half a chance(on its own terms, that means not wishing it had this or that, but accepting it for what it does have ) youll find that its not only good its GREAT!

Astronouth7303 09-02-2007 00:42

Re: What is Easy C good for?
 
I have to weigh in on the con side, here.

I have, in fact, used EasyC. I can see its usefulness at a high level. But as you start drilling down, it becomes more cumbersome.

Examples:
Math - Everything has to be in temporary variables or you inline C code.

Preprocessing - I didn't look much into this, but I'm not sure about EasyC's preprocessor support. I use it extensively, and, frankly, I'm not sure I could do in EasyC what I do in text editors (again, inline C doesn't count).

Inline Assembly - I have, in fact, briefly considered this for real robot code from time to time. I somehow doubt that EasyC supports it.

Now, comparing EasyC to MPLAB is not really a fair assessment. MPLAB is some of the worst software I have had to the misfortune of working with (along with MCC18, CoreChart, and IFI Loader). Comparing EasyC to, say, a well-equipped copy of Eclipse (or some of the other IDE) would probably be fair (maybe even unfair against EasyC!). I doubt EasyC could handle Subversion, compiling for multiple controllers, concurrently open projects, or the search capabilities (Where is this thing declared and defined? Where do I reference it?). That's not even getting into the multiple languages Eclipse can support (I have used python in my FIRST code, and not for the Makefile).

The only way I saw myself using EasyC was to write the high-level code and writing the actual hardware "drivers" in a separate library in C.

Of course, this is also with 3 years of code behind me. I don't have a "library", per se, but I do have a set of macros, functions, etc. that I reuse, plus a "standard" code layout. I mean, how many different ways can you implement a PID loop?

As for the "EasyC challenge", there's a difference between "can do in EasyC", "can do easily in EasyC", and "have to use inline C code to do it". eg, You can do some sick stuff in the preprocessor:
Code:

#define LINE(txt) #txt "\r\n"
#define PID_VARS(prefix) int prefix##_pid_p, prefix##_pid_d; static int prefix##_pid_i
#define MSG(fmt) #__FILE__ ":" #__LINE__ ": " #fmt "\r\n"

I have considered using all of these in FIRST code (except the last one, but I really should). (OT: Does MCC18 support variadic macros?)

Please correct me if I'm wrong, here.

My $.02

Shinigami2057 09-02-2007 00:56

Re: What is Easy C good for?
 
Quote:

Originally Posted by Astronouth7303 (Post 574780)
I have to weigh in on the con side, here.

I have, in fact, used EasyC. I can see its usefulness at a high level. But as you start drilling down, it becomes more cumbersome.

Examples:
Math - Everything has to be in temporary variables or you inline C code.

Preprocessing - I didn't look much into this, but I'm not sure about EasyC's preprocessor support. I use it extensively, and, frankly, I'm not sure I could do in EasyC what I do in text editors (again, inline C doesn't count).

Inline Assembly - I have, in fact, briefly considered this for real robot code from time to time. I somehow doubt that EasyC supports it.

Now, comparing EasyC to MPLAB is not really a fair assessment. MPLAB is some of the worst software I have had to the misfortune of working with (along with MCC18, CoreChart, and IFI Loader). Comparing EasyC to, say, a well-equipped copy of Eclipse (or some of the other IDE). I doubt EasyC could handle Subversion, compiling for multiple controllers, concurrently open projects, or the search capabilities (Where is this thing declared and defined? Where do I reference it?). That's not even getting into the multiple languages Eclipse can support (I have used python in my FIRST code, and for the Makefile).

The only way I saw myself using EasyC was to write the high-level code and writing the actual hardware "drivers" in a separate library in C.

Of course, this is also with 3 years of code behind me. I don't have a "library", per se, but I do have a set of macros, functions, etc. that I reuse, plus a "standard" code layout. I mean, how many different ways can you implement a PID loop?

As for the "EasyC challenge", there's a difference between "can do in EasyC", "can do easily in EasyC", and "have to use inline C code to do it". eg, You can do some sick stuff in the preprocessor:
Code:

#define LINE(txt) #txt "\r\n"
#define PID_VARS(prefix) int prefix##_pid_p, prefix##_pid_d; static int prefix##_pid_i
#define MSG(fmt) #__FILE__ ":" #__LINE__ ": " #fmt "\r\n"

I have considered using all of these in FIRST code (except the last one, but I really should). (OT: Does MCC18 support variadic macros?)

Please correct me if I'm wrong, here.

My $.02

Great points.

And yes, I believe MCC18 should support them, as it uses the GNU cpp (look for the source code, it comes with every install :cool:).

Astronouth7303 09-02-2007 01:26

Re: What is Easy C good for?
 
Quote:

Originally Posted by Shinigami2057 (Post 574786)
And yes, I believe MCC18 should support them, as it uses the GNU cpp (look for the source code, it comes with every install :cool:).

I'm not sure it's actually GNU cpp (wouldn't that be under GPL?), and I'm pretty sure mcc18 doesn't call cpp18 to do the preprocessing. (Although it might be the source to the preprocessor used internally in mcc18.)

Dave Scheck 09-02-2007 09:25

Re: What is Easy C good for?
 
Quote:

Originally Posted by Stuart (Post 574595)
(btw with EasyC you could plug your servos in to the camera board and not have to run 2 more wires to the RC)

You could do that last year, but they changed that this year
http://forums.usfirst.org/showthread...ighlight=servo
Quote:

Servos can only be controlled by the provided IFI Robot Controller.

BradAMiller 09-02-2007 10:06

Re: What is Easy C good for?
 
Here is a different point of view on the usefulness of easyC.

This is not a binary decision: easyC should/shouldn't exist, or easyC is better/worse than eclipse. For some people who are very comfortable writing lots and lots of C code with a good development environment then eclipse makes sense. For those without that experience then I've seen easyC enable them to do things with robots that they would never be able to do without it.

In classes, we used to use MPLab. For the last two years we've introduced easyC. What I found was that on 3-4 person teams, with MPLab and C only 1 or maybe 2 students on a team understood the program they wrote. With easyC, all the team members could participate in programming. easyC lowered the "barrier to entry" for new programmers significantly. Mentors are always telling me that easyC enables the students to write the code instead of the adults.

We did a beta test of easyC last year when it was released. About 10 FRC teams brought their 2005 robots with cameras for a day before the start of the 2006 season. Almost all the teams got the camera working and doing something. Some had it following them while they walked around the room with tetras. The interesting result was that many said that they got further in that one day than in the entire 6 weeks the previous year.

So, Jamie and others, if you're writing code with stuff like this:
Code:

#define LINE(txt) #txt "\r\n"
#define PID_VARS(prefix) int prefix##_pid_p, prefix##_pid_d; static int prefix##_pid_i
#define MSG(fmt) #__FILE__ ":" #__LINE__ ": " #fmt "\r\n"

then you should stick with eclipse, and we all aplaud you for the work you're doing making it such a good development environment for FIRST teams.

If you're a team with less programming experience, then I'd argue that easyC can be a huge help and let you realize your goals.

By the way, another model is teams with mixed very skilled programmers and others with less experience. The experienced members might write complex C algorithms and low level code. Then the up-and-coming programmers could use easyC, importing the C code either as a library or source, then write (and understand) the high level operation of the robot using blocks.

65_Xero_Huskie 09-02-2007 10:20

Re: What is Easy C good for?
 
Quote:

Originally Posted by Ben Piecuch (Post 564910)
Our students used the VEX program in the fall the learn about robotics, mechanisms, and specifically, EasyC programming. The EasyC software allows you to write your code using drag-and-drop type commands, similar to what the students learned way back during LEGO League. One of the great things about EasyC is that it comes preloaded with modules for the camera, gear tooth sensors, wheel encoders, and a slew of other sensors. Also, you're able to use the same interface for both FVC and FRC. The same program can even be used to run both robots, as EasyC is able to switch back and forth between the two.

If you can't find a use for EasyC, then you probably aren't using it correctly, or to it's full potential. If you have more questions about it, ask anyone from Team 40. They have a little more insight into the software, seeing as how they wrote it...

BEN

Vex is a good enough statement to say that EasyC is not useless.

Jon236 09-02-2007 10:24

Re: What is Easy C good for?
 
Brad,

Great answer. As our team's programming mentor, I can certainly verify everything you've said. We have all new programmers this year, and I actually haven't had to write a line of code! Our programmer told me last night how comfortable he feels with EasyC.

Jon Mittelman

yongkimleng 09-02-2007 11:32

Re: What is Easy C good for?
 
I'd personally used EasyC for vex and must say that its definitely much easier for my role (to teach programming) to the kids! I cleared the basics in <= 1 day.. never could I have done the same with traditional teaching lines of C code and syntax. Not only that, they start coding very fast and must say that I am amazed at the simplicity of basic C building blocks :ahh:

But besides that, not sure if the kids will end up learning proper C syntax or get interested in typing-based coding in future.

Personally prefer MPLAB and Eclipse, typing is faster for me. MPLAB is a terrible GUI IDE, but not complaining too much as Eclipse is quite well developed by the masses. MPLAB is like the basic so I'm not complaining of lack of frills. EasyC has been developed a lot to have templates in the form of boxes, and much integration to ensure that it will work with the processor it is bundled with. Going a level higher to other microcontrollers, one cannot avoid going towards mplab / raw C / ASM programming, unless another takes effort to do the neccessary template legwork to make it easy for the massses to program that particular controller.

I hope there will not be any quarrels/war due to easyc/mplab, its just like mac/PC or C++/java. Both have their advantages and cater to different purposes. Both are useful tools and different learning curves.. different interfaces, different methods of working with your algo... being well versed with both tools would be the best :)

Dave Flowerday 09-02-2007 11:42

Re: What is Easy C good for?
 
Quote:

Originally Posted by Astronouth7303 (Post 574780)
MPLAB is some of the worst software I have had to the misfortune of working with (along with MCC18, CoreChart, and IFI Loader).

The IFI Loader is some of the worst software you've had to work with? Seriously? Trust me, there's a ton of software out there that's worse than it. Personally, I think the IFI Loader is simple, effective, and reliable. Just what I like to see. The only complaint I have about it is that it's built-in terminal window can't seem to keep up with 115200 serial (it has lag, as I'm sure others have noticed).
Quote:

Originally Posted by Astronouth7303 (Post 574780)
Comparing EasyC to, say, a well-equipped copy of Eclipse (or some of the other IDE) would probably be fair (maybe even unfair against EasyC!).

Heh, this is definitely a case of "to each his own", because I consider Eclipse to be one of the worst development environments I've had to work with. It's huge and bloated, painfully slow, complicated, and has so many features and gadgets that finding the simple stuff is nearly impossible. Just give me Vim and a command prompt with Make and I'm happy ;)

Donut 09-02-2007 13:40

Re: What is Easy C good for?
 
I was in the camp of EasyC is a waste, and I'm still partially there because I have no exeprience using EasyC Pro. My main complaint with EasyC was that you couldn't write your own program in it, and since it didn't have support for many non-Vex sensors (I've only used it for Vex) it wasn't useful for working with them.

Now that EasyC Pro has come out and given me most of the things that I wanted to do in the original EasyC but couldn't, I probably wouldn't mind using it. This year's choice was a no brainer as I know MPLAB well and hadn't even seen the features EasyC Pro had, so I didn't bother looking at it.

I believe there's some value in doing coding by hand, but when speed is a necessity EasyC Pro certainly seems a good option.

Tom Bottiglieri 09-02-2007 14:47

Re: What is Easy C good for?
 
Quote:

Originally Posted by Donut (Post 574983)
I believe there's some value in doing coding by hand, but when speed is a necessity EasyC Pro certainly seems a good option.

Eh, be careful with that.. EasyC is GREAT at what it does: facilitating robot programming for non experienced programmers. It is also pretty good to throw some quick debugging code up on the robot, to check sensors and such. But for the most part, I have to agree with Jamie. Writing the code by hand will be much faster and much more efficient.

The reason why easyC programs are so fast and easy to set up is not because of its graphical nature, but rather the framework the programs you make sit on top of. WPILib takes a pretty high level approach to programming the robot, and thats where the speed in development comes from. Because you dont have to spend time meddling with interrupts, fast/slow loops, low-level output variables, etc, you can just jump right in and start programming for functions of your robot. If you like what you're seeing with WPILib, keep in mind that you can have the best (or at least what I think is the best) of both worlds. You can import the library into your C projects in your IDE of choice (I use code::blocks), and have it cranking out hex files for the robot in less than 10 minutes.

If you're interested, keep checking back over the next few days.. I will be putting up a default workspace for code::blocks that works right out of the box with WPILib and MCC18. With this you have the ability to use an awesome, middle weight IDE, and select ON THE SPOT which controller you want to use (FRC07, FRC05, VEX) without changing any of your source code.

Donut 09-02-2007 16:15

Re: What is Easy C good for?
 
Quote:

Originally Posted by Tom Bottiglieri (Post 575022)
Eh, be careful with that.. EasyC is GREAT at what it does: facilitating robot programming for non experienced programmers. It is also pretty good to throw some quick debugging code up on the robot, to check sensors and such. But for the most part, I have to agree with Jamie. Writing the code by hand will be much faster and much more efficient.

When I meant speed I meant as in speed of developing the code; I completely agree that using MPLAB you have more ability to customize your code so that it runs faster and doesn't have any extraneous code as a result of pre-made functions.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi