[{"element_type":"alert","content":"Because PlatformIO has not yet added arduino-esp32 core alpha 3.x support, these instructions rely on using Arduino IDE (which is noticeably slower to compile).\n\nThese instructions will be switched over to using the platformio build system once 3.x is supported.","metadata":{"class":"element row-fluid alert-element build-alert alert-info","alert_type":"info"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eInstall arduino-esp32 from the source\u003c/h2\u003e\n\u003cp\u003eWipperSnapper is an Arduino application built on a board support package like the ESP32 Arduino Core. To build WipperSnapper, you will want the \u003cem\u003eabsolute latest\u003c/em\u003e version of the arduino-esp32 core installed into Arduino.\u003c/p\u003e\n\u003cp\u003eTo do this, follow the steps below:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eInstall the latest version of \"Arduino \u003cstrong\u003eLegacy IDE (1.8.X)\u003c/strong\u003e\" from \u003ca href=\"arduino.cc/en/software\"\u003earduino.cc/en/software\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003eAfter Installing Arduino IDE 1.8.X, open Arduino IDE. Then, after it loads, close it.\u003c/li\u003e\n\u003cli\u003eInstall the latest version of the Arduino-ESP32 board support package for your platform. Make sure to follow the instructions on the espressif documentation, rather than installing the board support package directly from Arduino IDE\n\u003col\u003e\n\u003cli\u003eFor Linux, \u003ca href=\"https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#debian-ubuntu\"\u003efollow the install instructions here...\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003eFor MacOS, \u003ca href=\"https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#macos\"\u003efollow the install instructions here...\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003eFor Windows, \u003ca href=\"https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#windows-manual-installation\"\u003efollow the install instructions here...\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eVerify Installation\u003c/h3\u003e\n\u003cp\u003eOpen Arduino IDE and navigate to the \u003cem\u003eTools-\u0026gt;Board \u003c/em\u003emenu. From there, you should see \"ESP32 Arduino (in sketchbook)\".\u0026nbsp;The \u003cem\u003e(in sketchbook)\u0026nbsp;\u003c/em\u003epart of the string identifies that you have installed the Arduino-ESP32 core manually, rather than using the Board Manager.\u003c/p\u003e\n\u003cp\u003eIf your path exactly matches the one shown in the screenshot below, let's move onto the next step.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/512/original/sketchbook.png?1701961514","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eInstall Arduino Dependencies for\u0026nbsp;WipperSnapper Library\u003c/h2\u003e\n\u003cp\u003eSince it supports a large portion of sensors, WipperSnapper brings in \u003cem\u003ea lot\u003c/em\u003e of library dependencies. To install (most) of them, we'll use Arduino IDE.\u003c/p\u003e\n\u003cp\u003eIn Arduino IDE, navigate to \u003cem\u003eSketch -\u0026gt; Include Library -\u0026gt; Library Manager\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eWithin the library manager, search for WipperSnapper and install the latest version.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eIf you aim to build off a pre-release of WipperSnapper, scroll to the bottom of the \"Select Version\" modal for\u0026nbsp;\u003cem\u003ealpha\u003c/em\u003e versions of WipperSnapper.\u003c/li\u003e\n\u003c/ul\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/513/original/Library_Manager.png?1701962282","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eAfter installing, your Arduino installation should have most of the dependencies required for WipperSnapper. Due to how the CI for WipperSnapper is configured for specific build platforms, you will also need to manually install a few extra libraries, from the library manager:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cem\u003eDallasTemperature\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eOneWireNg\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eAdafruit HX8357 Library\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eAdafruit ILI9341\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eAdafruit STMPE610\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003eAdafruit_TouchScreen\u003c/em\u003e\u003c/li\u003e\n\u003c/ul\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n        \u003cp\u003eNext, locate your Arduino sketchbook's \u003cem\u003elibraries\u003c/em\u003e\u0026nbsp;subfolder and install two required libraries into this folder:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eTo find this folder, visit \u003ca href=\"https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer\"\u003ehttps://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer\u003c/a\u003e and look underneath \"Libraries\" for the directory that matches your operating system\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cspan\u003eInstall the \u003ccode\u003ewippersnapper\u003c/code\u003e branch of LVGL to this folder (We freeze a specific version of LVGL for WipperSnapper):\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003e\u0026nbsp;\u003ccode\u003egit clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git\u003c/code\u003e\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eAlso, install the LVGL_Glue library to this folder:\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003e\u003cspan\u003egit clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git\u003c/span\u003e\u003c/code\u003e\u003c/p\u003e\n      ","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003e(Optional) Re-install WipperSnapper Library from Source\u003c/h2\u003e\n\u003cp\u003eIf you are developing WipperSnapper, you'll want to work from a fork of the latest \u003ccode\u003emaster\u003c/code\u003e branch.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eDelete\u003c/strong\u003e the current version of \u003cem\u003eAdafruit_WipperSnapper_Arduino\u003c/em\u003e from the Arduino Sketchbook Library sub-folder.\u003c/li\u003e\n\u003cli\u003eCreate a fork of WipperSnapper on your git account by visiting \u003ca href=\"https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/\"\u003ehttps://github.com/adafruit/Adafruit_Wippersnapper_Arduino\u003c/a\u003e and clicking\u0026nbsp;\u003cstrong\u003eFork\u003c/strong\u003e.\u003c/li\u003e\n\u003cli\u003eUsing \u003ccode\u003egit clone\u003c/code\u003e, clone the fork directly into the sketchbook library subfolder\u003c/li\u003e\n\u003c/ul\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eBuild WipperSnapper for a Specific Board\u003c/h2\u003e\n\u003cp\u003eBuilding and uploading WipperSnapper to a board ensures everything is installed and working correctly. For this example, we'll use the Adafruit ESP32-S2 Feather.\u003c/p\u003e\n\u003cp\u003eFrom Arduino IDE, open the WipperSnapper example sketch by navigating to \u003cem\u003eFile-\u0026gt;Adafruit WipperSnapper-\u0026gt;Wippersnapper_demo\u003c/em\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/514/original/Wippersnapper_demo___Arduino_1_8_19.png?1701968294","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eSelect the board you're using by navigating to \u003cem\u003eTools-\u0026gt;Board-\u0026gt;ESP32 Arduino (in sketchbook)-\u0026gt;{BOARD NAME}.\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eThen, ensure the board is plugged into your computer and navigate to: Tools-\u0026gt;Port-\u0026gt;{board_port}.\u003c/p\u003e\n\u003cp\u003eUpload the sketch to your board by clicking\u0026nbsp;\u003cstrong\u003eTools-\u0026gt;Upload\u003c/strong\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n        \u003ch2\u003eGet Compiler Artifacts/Output\u003c/h2\u003e\n\u003cp\u003eIf you would like to check artifacts produced by the compiler, such as the .bin and memory .map files, the end of the compiler output provides a directory for the .elf file.\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/516/original/compileout.png?1701969119","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n        \u003cp\u003eNavigate to this folder for the build's artifacts:\u003c/p\u003e\n      \n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/515/original/build_files.png?1701969109","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n        \u003ch2\u003eConfigure Arduino BSP Libraries\u003c/h2\u003e\n\u003cp\u003eFor memory optimization, I've found that Espressif provides a tool to simplify building your own compiled libraries for use in Arduino IDE called \u003ca href=\"https://github.com/espressif/esp32-arduino-lib-builder\"\u003eLibrary Builder\u003c/a\u003e. This tool contains scripts that produce the pre-compiled (.a) libraries included with esp32-arduino.\u003c/p\u003e\n\u003cp\u003eThe tool's output is dictated by a set of configuration files (\u003ca href=\"https://github.com/espressif/esp32-arduino-lib-builder/tree/master/configs\"\u003ehttps://github.com/espressif/esp32-arduino-lib-builder/tree/master/configs\u003c/a\u003e) specific to each ESP32 platform. However, there is a \u003ca href=\"https://github.com/espressif/esp32-arduino-lib-builder/blob/master/configs/defconfig.common\"\u003ecommon configuration\u003c/a\u003e that runs across all platforms.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eNote: \u003ca href=\"https://github.com/espressif/esp32-arduino-lib-builder/issues/102#issuecomment-1375323094\"\u003eusing a custom sdkconfig\u003c/a\u003e works for only one specific platform. If you run menuconfig, you will need to copy over the sdkconfig to a configuration script instead as the sdkconfig file will get overwritten.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eDocumentation for running this tool is available at \u003ca href=\"https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/lib_builder.html\"\u003ehttps://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/lib_builder.html\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eAfter building (which takes about an hour-ish) the libraries, use the \u003cem\u003etools/copy-to-arduino.sh\u003c/em\u003e script to move the new libraries into the arduino-esp32 folder.\u003c/p\u003e\n\u003cp\u003eFinally, re-open Arduino IDE and, repeat \"Build WipperSnapper for a Specific board\" to initiate a new wippersnapper build with the libraries produced by esp32-arduino-lib-builder..\u003c/p\u003e\n      \n","metadata":{}}]