sometimes you want to move you code from EasyC to MPLab and here is how you can do it:
EasyC’s default is the tab called “Function Blocks.” There are two tabs iIn the bottom left corner of the EasyC programming environment. One is labeled “Function Blocks” and the other is “Project”.
Here is how you get to the “C” code to copy it out of EasyC:
Click on the “Project” tab.
Expand the desired subsection (Source File, Header File etc.)
Double click on the file you want to copy.
When it opens, it should be the text version alone with no EasyC programming blocks. If it is not, please follow the previous two instructions.
From here you must select what you want to copy and “right-click” and select “copy”. (If you press “ctrl+C”, you will not get your code!)
Go to where you want to copy the code to and right click then click on paste.
Sorry if someone else posted this. I looked but couldn’t find anything.
Thanks for the tip. It was a frustrating task, having our n00blettes retype their code in MPLAB when they graduated from EasyC. I did not realize you could do this.
You’ll have to graduate to real code some day. You can’t exactly code advanced functions on an FRC bot in EasyC the way it’s setup…or at least I haven’t found a way to yet and maybe you have.
easyC has a normal editor ‘C’ text built in that works just like MPLAB. You can type your create your own header files, code files, type your own code, include your own libraries, write structs, variables, you name it. Plus you can convert block code to functions to ‘C’ functions for tweaking.
All of this is just waiting for you under the “Project” tab.
P.S. all the .c and .h files converted to c code are stored in the projects directory.
We started the year using EasyC PRO to code our robot, but ending up writing the vast majority of it in the text editor using WPIlib (aka the backbone of EasyC). Our robot has full PID sensor-feedback and control loops for every mechanism on our robot, and we have an autonomous mode that drives out (and uses all its sensors for drift correction, exact distances, accident prevention), scores on the rack in a drive-by maneuver, and then stops on the other side of the playing field, without dead reckoning.
I don’t think our team ever would have even attempted something as ‘advanced’ as this before EasyC PRO/WPIlib came out, as this was our first robot (out of our nine) with 100%-complete sensor feedback and absolutely no dead reckoning.