Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

i do have sketch from various people out there who have build nice code to do what i need done BUT not for my application and well they grant us permission to use and or modify their code so this is what i attempt to do with your help.

share|improve this question

closed as too broad by fuenfundachtzig, BrettAM, LoganBlades, Annonomus Penguin May 23 at 20:15

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.

1  
I'm afraid there is no general recipe for combining code snippets. Also, you should avoid adding more questions in the comments. Please feel free to ask separate questions if you have concrete things to ask about. –  fuenfundachtzig May 19 at 19:59

1 Answer 1

up vote 1 down vote accepted

Unfortunately there is no easy way to do this. All you can hope to do if you see multiple sketches, which if combined would achieve your desired goal, is to splice the code into a single sketch (by copying and pasting), and hope that there are no conflicts resulting from the merging of the different sets of code.

For simple things like two sketches using the same pins, you may be able to fix that by changing which pins are used (unless they are special purpose pins such as PWM or hardware interrupts).

For harder to diagnose problems like two libraries not working if used the same sketch, that is almost impossible to resolve unless you know the hardware or library well enough. Best option there is to find another that does the same job, but differently.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.