# Exporting files into arduino

**URL:** <http://forum.squareline.io/t/exporting-files-into-arduino/303>\
**Category:** How to\
**Tags:** release\
**Created:** [June 10, 2022, 1:01am UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303 "2022-06-10T01:01:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![do\_not\_sleep](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@do\_not\_sleep](http://forum.squareline.io/u/do_not_sleep)\
**Post date:** [June 10, 2022, 1:01am UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/1 "2022-06-10T01:01:31Z")

</div>

### What do you want to achieve? to take my successfully exported gui project and open it inside of arduino IDE to define functions and upload to MCU

### What have you tried so far? importing directly but arduino says it needs to be .ino file not c header file to open

### Screenshot or video N/A

### Others

- \*\*SquareLine Studio version:\*\*1.05
- **Operating system:** windows
- **Target hardware:** huh?

hello everyone thanks in advance for the help but i am new and wondering how i can import my project folder to arduino ide to play with inside the ide and eventually upload to my mcu how can i open in arduino?

---

<div class="post-metadata">

**Author:** ![SquareLine\_Support](http://forum.squareline.io/user_avatar/forum.squareline.io/squareline_support/32/47_2.png) [@SquareLine\_Support](http://forum.squareline.io/u/SquareLine_Support)\
**Post date:** [June 10, 2022, 10:21am UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/2 "2022-06-10T10:21:44Z")

</div>

Hi,

I suggest taking a look at this great video to get started with Arduino and SquareLine Studio

[![](https://img.youtube.com/vi/LrvqSjLzo44/maxresdefault.jpg "Creating Tesla's Website in SquareLine Studio (ESP32+LVGL)") ](https://www.youtube.com/watch?v=LrvqSjLzo44)

---

<div class="post-metadata">

**Author:** ![dronecz](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@dronecz](http://forum.squareline.io/u/dronecz)\
**Post date:** [June 10, 2022, 2:56pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/3 "2022-06-10T14:56:41Z")

</div>

It is simple, your sketch (.ino file) should be in same folder as your exported files from SLS and this folder must have same name as your sketch.

After that, you have to include these 2 lines:

```auto
#include "ui.h"
#include "ui_helpers.h"

```

I would recommend to start with LVGL example for Arduino.

---

<div class="post-metadata">

**Author:** ![do\_not\_sleep](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@do\_not\_sleep](http://forum.squareline.io/u/do_not_sleep)\
**Post date:** [June 10, 2022, 5:22pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/4 "2022-06-10T17:22:22Z")

</div>

and just to clarify just transfer the C header files to the arduino sketch location correct?

the video posted above goes a little to fast

---

<div class="post-metadata">

**Author:** ![do\_not\_sleep](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@do\_not\_sleep](http://forum.squareline.io/u/do_not_sleep)\
**Post date:** [June 10, 2022, 6:14pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/5 "2022-06-10T18:14:00Z")

</div>

when i added the files to the sketchbook it added correctly but its asking for me to include the  
SDL/SDL2 library i downloaded it from github but im also not sure how to include it in the library when i try to add it as a zip library arduino tells me no library is in the folder and then i thought i would add the files like how you said above by dragging and drop but it took me like a hour and is still asking for more files to be included and now the sketch book is a mess.

can you tell me how i can add the sdl/sdl2 (i downloaded both) library to the sketch since i cant import it as a zip library?

---

<div class="post-metadata">

**Author:** ![dronecz](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@dronecz](http://forum.squareline.io/u/dronecz)\
**Post date:** [June 10, 2022, 9:09pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/6 "2022-06-10T21:09:08Z")

</div>

I have folder structure like this:

![image](http://forum.squareline.io/uploads/default/original/1X/dd95190ebc2063d3bef8df48dccb06e1ef1d8731.png)

which correspond to project in Arduino IDE:

 ![image](http://forum.squareline.io/uploads/default/original/1X/c808dc1832818be4383192e8aaa32ce3bba85583.png)

As far as I know you should not need any SDL library to make SLS code work with Arduino.

 ![image](http://forum.squareline.io/uploads/default/original/1X/54429b1c0f3f0cf1287448fbf3150c3e16cdf7a6.png)

If you can, share some code which are you trying to make work 😉

---

<div class="post-metadata">

**Author:** ![do\_not\_sleep](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@do\_not\_sleep](http://forum.squareline.io/u/do_not_sleep)\
**Post date:** [June 11, 2022, 12:57am UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/7 "2022-06-11T00:57:30Z")

</div>

once i deleted those included libraries i got this error

onedrive\documents\arduino\libraries\lvgl\src\lv\_conf\_internal.h:41:103: fatal error: …/…/lv\_conf.h: No such file or directory  
compilation terminated.  
exit status 1  
Error compiling for board TTGO T-Watch.

i have the conf.h file included im just not sure what it wants me to do after that cause other than that error everything looks okay

---

<div class="post-metadata">

**Author:** ![dronecz](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@dronecz](http://forum.squareline.io/u/dronecz)\
**Post date:** [June 11, 2022, 1:08am UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/8 "2022-06-11T01:08:55Z")

</div>

Where do you have your `lvgl_conf.h` placed? It should be in `libraries` folder as it is here:

![image](http://forum.squareline.io/uploads/default/original/1X/4d8115e90a61c8ef0c9d4f51d0cb2b2e2e8a99e1.png)

---

<div class="post-metadata">

**Author:** ![do\_not\_sleep](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@do\_not\_sleep](http://forum.squareline.io/u/do_not_sleep)\
**Post date:** [June 11, 2022, 1:12am UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/9 "2022-06-11T01:12:30Z")

</div>

![image](http://forum.squareline.io/uploads/default/original/1X/9086de308a4e9dbf8a30a421562aae6effa0a5e1.png)

i have it saved here in the project files of the sketch itself

---

<div class="post-metadata">

**Author:** ![do\_not\_sleep](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@do\_not\_sleep](http://forum.squareline.io/u/do_not_sleep)\
**Post date:** [June 12, 2022, 6:33pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/10 "2022-06-12T18:33:10Z")

</div>

it was giving me that issue because i exported the whole project instead of just the files from the ide now that i imported the files only its playing a lot more nicely still need to debug some stuff but im feeling a lot better thanks

---

<div class="post-metadata">

**Author:** ![AlwaysLearning](http://forum.squareline.io/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@AlwaysLearning](http://forum.squareline.io/u/AlwaysLearning)\
**Post date:** [January 1, 2023, 8:07pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/11 "2023-01-01T20:07:58Z")

</div>

Hi all,

First time trying to upload a SLS project to ESP32 Dev using Arduino IDE.  
I’ve followed the “how to” video for export but I’m not having much luck.

Receiving this error:

```auto
fatal error: lvgl/lvgl.h: No such file or directory
 #include "lvgl/lvgl.h"

```

I’ve not altered the directory structure that was created automatically by SLS.

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![dronecz](http://forum.squareline.io/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@dronecz](http://forum.squareline.io/u/dronecz)\
**Post date:** [January 1, 2023, 8:13pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/12 "2023-01-01T20:13:50Z")

</div>

What version of SLS are you using?

I have export of my project and I have this in my `ui.h`:

```auto
#if defined __has_include
#if __has_include("lvgl.h")
#include "lvgl.h"
#elif __has_include("lvgl/lvgl.h")
#include "lvgl/lvgl.h"
#else
#include "lvgl.h"
#endif
#else
#include "lvgl.h"
#endif

```

In what file do you have your `#include "lvgl/lvgl.h"`?

---

<div class="post-metadata">

**Author:** ![AlwaysLearning](http://forum.squareline.io/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@AlwaysLearning](http://forum.squareline.io/u/AlwaysLearning)\
**Post date:** [January 1, 2023, 8:24pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/13 "2023-01-01T20:24:31Z")

</div>

Thanks for the quick help!

SLS version: 1.1.1 (using Mac).

Looks like I have the "#include “lvgl/lvgl.h” in several files.

Before I saw your message, I commented out the "#include “lvgl/lvgl.h” in each file which removed the compile error.

Yet now I’m receiving many errors. I will try your solution now.

Just to test, do you recommend one of the SLS examples that you’ve successfully loaded onto ESP32 dev using Arduino IDE?

Thank you again for the help.

---

<div class="post-metadata">

**Author:** ![AlwaysLearning](http://forum.squareline.io/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@AlwaysLearning](http://forum.squareline.io/u/AlwaysLearning)\
**Post date:** [January 1, 2023, 8:42pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/14 "2023-01-01T20:42:20Z")

</div>

I tried loading the “Thermostat” example yet getting a compilation error:

```auto
Compilation error: expected ';' before 'const'

```

Looks like this is in reference to one of the bitmap commands.

---

<div class="post-metadata">

**Author:** ![kisvegabor](http://forum.squareline.io/user_avatar/forum.squareline.io/kisvegabor/32/537_2.png) [@kisvegabor](http://forum.squareline.io/u/kisvegabor)\
**Post date:** [January 2, 2023, 2:08pm UTC](http://forum.squareline.io/t/exporting-files-into-arduino/303/15 "2023-01-02T14:08:23Z")

</div>

Please attach the whole build log.
