How to merge my sketches?

Post content lost due to vandalism by author

Does the third code fragment work? Does it do what you want? If not what doesn't it do?

If you've made some attempts at combined versions please post the best of your attempts and tell us what that does or doesn't do. People round here are generally keener on helping to fix something you've tried to write rather than writing it for you.

Also a quick Google of "arduino combining sketches" should get you plenty of ideas about the basics of putting two things together.

Steve

Have a read of this:-
http://www.thebox.myzen.co.uk/Tutorial/Merging_Code.html

*I'll post my sad, failed attempts at combining the code

We only need to have one of these not all. Post what you think is the best shot.

Normally the problem is that you have a delay in one of the codes that stops the other code from getting a look in. You need to implement a state machine.
See my
http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html
Or Robin2's several things at once
http://forum.arduino.cc/index.php?topic=223286.0

Aka, wise lesson learned today. BACKUP BACKUP BACKUP BACKUP! :wink:

A slightly more detailed description of any problems than just "doesn't work right" might help with diagnosis.

Steve