# Need advice how to merge few sketches into one

**URL:** <https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143>\
**Category:** Programming\
**Created:** [July 8, 2021, 6:26pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143 "2021-07-08T18:26:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanren](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/shanren/32/1098708_2.png) [@shanren](https://forum.arduino.cc/u/shanren)\
**Post date:** [July 8, 2021, 6:26pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143/1 "2021-07-08T18:26:03Z")

</div>

Hi,  
I'd like to merge few sketches into one, I am planning to setup a main sketch and all others merge as a function, is this OK?  
Thanks.  
Adam

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [July 8, 2021, 6:27pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143/2 "2021-07-08T18:27:45Z")

</div>

> [@shanren](#):
>
> is this OK?

Sure, you have our permission. Do you need help?

[Combining Arduino codes.](http://www.thebox.myzen.co.uk/Tutorial/Merging_Code.html)

---

<div class="post-metadata">

**Author:** ![shanren](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/shanren/32/1098708_2.png) [@shanren](https://forum.arduino.cc/u/shanren)\
**Post date:** [July 8, 2021, 6:36pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143/3 "2021-07-08T18:36:42Z")

</div>

Thanks.  
Actually, I just don't how to make few sketches working together.  
I was planning to put them into one file, but seems it's better to use multi-sketches with multi tabs?  
And I saw the multi sketches named the other sub sketches as .h, is this a must, then how to call them?

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [July 8, 2021, 6:43pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143/4 "2021-07-08T18:43:00Z")

</div>

> [@shanren](#):
>
> Actually, I just don't how to make few sketches working together.

Did you read the tutorial that I linked?

---

<div class="post-metadata">

**Author:** ![shanren](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/shanren/32/1098708_2.png) [@shanren](https://forum.arduino.cc/u/shanren)\
**Post date:** [July 8, 2021, 6:50pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143/5 "2021-07-08T18:50:27Z")

</div>

Thank you.  
The link is a wonderful solution.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 5, 2021, 6:51pm UTC](https://forum.arduino.cc/t/need-advice-how-to-merge-few-sketches-into-one/883143/6 "2021-11-05T18:51:15Z")

</div>

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
