Asked — Edited

Re-Use Of Code

One of the things I love about the Arduino is that it’s easy to find a code snippet from someone’s project that you can reuse by cutting and pasting.

What is the best way to do this in the ARC environment? Can one copy controls from one project to the next or just the scripts them self’s? It would be awesome for instance to take a fully configured personality generator from project X and copy into project Y without having to one by one re-insert each script one by one.

This could save a lot of time.


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

#1  

Of course and it's easy... Just use the Merge function in the main menu tool bar... Copy and paste works for everything else...

#2  

RR's totally correct (as usual. lol) . I'd like to add to his suggestion;

You can browse and open projects, EZ-Script Examples and other builder's posted projects directly through ARC. Just go up to the Menu bar and in the EZ-Cloud App Store section click on the Open icon. When a new window opens you'll need to choose what you want to look at on the left side of the window. This choice menu is a little busy and confusing (at least it is for me) but after you play with it a little it will become clear. Once you choose and open an example or project you like you can then find and open any of it's Controls or EZ-Scripts to look over the coding. Then when you find code you can use just copy and paste into your project. It should go without saying that the copied code would probably need to be adjusted to your project to point at proper ports, settings and retimed to your needs.

The following is directed at people new to EZ-Script so please forgive if you're more advanced; Browsing through the projects and examples is also a great way to learn EZ Script and how to code. This is a highly recommended way to learn this very easy language. Sure you can just use installed controls and adjust the ports in them to work on your robot but if you want it to really come alive, take advantage of additional devices and do really cool things you should learn how to EZ code. Once you start writing your own EZ Scripts you'll be surprised how often you'll be going back to it and copying it to use in other new scripts you'll want to wright. ;)

PRO
Synthiam
#3  

You can always ask for code help on here - that's the most powerful method. Also, if you ask for assistance, its gaurenteed the code will actually work!

Aaaaaaaand have you actually ever gotten an arduino code snippet to work? Haha, im guessing No:D

#4  

DJ, yes Arduino coding is relatively easy for an engineer. But not as easy as ARC and scripting!

PRO
Synthiam
#5  

Haha ha - it rarely works for me! At least not without a lot of editing:)

I like the community aspect of coding on here. Asking and working with others to achieve a goal. While you can copy and paste, using the windows copy and paste function. OR you can use the merge function to merge complete controls and scripts.... it's nice to talk to people:)

#6  

I agree. This is a great thing. Well done.

PRO
Synthiam
#7  

Thank the community:) I'm only the glue:D

#8  

True, I've never asked for help and not gotten more than a solution. Always with a smile. :)