{"id":2862,"date":"2025-12-01T23:38:50","date_gmt":"2025-12-01T23:38:50","guid":{"rendered":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/?p=2862"},"modified":"2025-12-01T23:41:35","modified_gmt":"2025-12-01T23:41:35","slug":"getting-started-with-the-esp32-s2-mini","status":"publish","type":"post","link":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/?p=2862","title":{"rendered":"Getting Started with the ESP32 S2 Mini"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Getting Started with the ESP32 S2 Mini<\/h1>\n\n\n\n<p>The ESP32 S2 Mini i s a small development board based on the ESP32-S2FN4R2 chip. The ESP32-S2 Mini by Wemos can be used as an Arduino, which is what this post covers. It can also be programmed in other ways, including with MicroPython, CircuitPython and with the chip manufacturer&#8217;s (Espressif) own software development kit.<\/p>\n\n\n\n<div class=\"wp-block-jetpack-tiled-gallery aligncenter is-style-rectangular\"><div class=\"tiled-gallery__gallery\"><div class=\"tiled-gallery__row\"><div class=\"tiled-gallery__col\" style=\"flex-basis:78.00832862833157%\"><figure class=\"tiled-gallery__item\"><img srcset=\"https:\/\/i1.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203503.png?strip=info&#038;w=600&#038;ssl=1 600w,https:\/\/i1.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203503.png?strip=info&#038;w=900&#038;ssl=1 900w,https:\/\/i1.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203503.png?strip=info&#038;w=911&#038;ssl=1 911w\" alt=\"ESP32-S2 Mini\" data-height=\"911\" data-id=\"2867\" data-link=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/?attachment_id=2867\" data-url=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203503.png\" data-width=\"1531\" src=\"https:\/\/i1.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203503.png?ssl=1\" layout=\"responsive\"\/><\/figure><\/div><div class=\"tiled-gallery__col\" style=\"flex-basis:21.99167137166843%\"><figure class=\"tiled-gallery__item\"><img srcset=\"https:\/\/i0.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203850.png?strip=info&#038;w=600&#038;ssl=1 600w,https:\/\/i0.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203850.png?strip=info&#038;w=900&#038;ssl=1 900w,https:\/\/i0.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203850.png?strip=info&#038;w=1200&#038;ssl=1 1200w,https:\/\/i0.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203850.png?strip=info&#038;w=1452&#038;ssl=1 1452w\" alt=\"ESP32-S2 Mini Reverse\" data-height=\"1452\" data-id=\"2866\" data-link=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/?attachment_id=2866\" data-url=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203850.png\" data-width=\"685\" src=\"https:\/\/i0.wp.com\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/20241220_203850.png?ssl=1\" layout=\"responsive\"\/><\/figure><\/div><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Capabilities<\/h2>\n\n\n\n<p>The board can be used as an Arduino, although as with all different Arduino boards, it will have quirks that will mean some libraries will need special versions. This is the same as different boards within the Arduino family to a degree, and is often due to a mixture of hardware features being on different pins, or software maturity. It is worth pushing through these issues for the benefits the chip brings over a standard Arudino Uno or similar.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Processor Speed &#8211; 240MHz (32bit)<\/li>\n\n\n\n<li>3.3V Power and digital outputs, but 5v tolerant digital input pins (you can send it 5V signals without harm)<\/li>\n\n\n\n<li>USB-C Connector<\/li>\n\n\n\n<li>Wifi capable (can be turned off if not needed)<\/li>\n\n\n\n<li>4MB Flash (for programs, and for storing resources such as images, html files or sounds)<\/li>\n\n\n\n<li>2MB of RAM<\/li>\n\n\n\n<li>27 I\/O pins<\/li>\n\n\n\n<li>12 Digital I\/O pins<\/li>\n\n\n\n<li>18 Analogue Input Pins<\/li>\n\n\n\n<li>2 Proper Analogue Output Pins (not PWM)<\/li>\n\n\n\n<li>27 PWM Capable Pins<\/li>\n\n\n\n<li>27 Pins Serial Capable<\/li>\n\n\n\n<li>Multiple I2C and SPI Busses<\/li>\n<\/ul>\n\n\n\n<p>Note this specific chip doesn&#8217;t support Bluetooth (unlike other related products which sometimes do).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reference Materials<\/h2>\n\n\n\n<p>Handy for looking up electrical specifications, the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.espressif.com\/sites\/default\/files\/documentation\/esp32-s2_datasheet_en.pdf\" target=\"_blank\">chip datasheet can be found here<\/a>, and there is <a href=\"https:\/\/docs.espressif.com\/projects\/arduino-esp32\/en\/latest\/libraries.html\" target=\"_blank\" rel=\"noreferrer noopener\">information on Arduino compatibility here<\/a>.<\/p>\n\n\n\n<p>The development board manufacturer has <a rel=\"noreferrer noopener\" href=\"https:\/\/www.wemos.cc\/en\/latest\/s2\/s2_mini.html\" target=\"_blank\">reference materials here<\/a> and <a href=\"https:\/\/www.wemos.cc\/en\/latest\/tutorials\/s2\/get_started_with_arduino_s2.html\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino getting started here.<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/i.redd.it\/eoaza0nnhgq91.jpg\" target=\"_blank\" rel=\"noreferrer noopener\">Pinout Diagram<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adding the Board to the Arduino IDE and First Test<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Launch the Arduino IDE (I&#8217;m using version 1.8.9 on Linux).<\/li>\n\n\n\n<li>Go to Tools&gt;Boards&gt;Board Manager, and type in &#8220;ESP32&#8221;.<\/li>\n\n\n\n<li>Select and install Version 3.1 (3.1 is the newest at the time of writing &#8211; version 3.0.5 didn&#8217;t work properly for me) &#8220;esp32 by Espressif Systems&#8221; (<strong>not<\/strong> &#8220;Arduino ESP32 Boards&#8221;).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" width=\"884\" height=\"504\" src=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-9.png\" alt=\"\" class=\"wp-image-2875\" srcset=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-9.png 884w, https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-9-300x171.png 300w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If &#8220;esp32 by Espressif Systems&#8221; doesn&#8217;t show up in the list when you search, go to File&gt;Preferences and add the following text to the &#8220;Additional Boards Manager URLs&#8221; text box. If there is already text in there, you need to add it to the end, after a comma and a space.<\/li>\n<\/ul>\n\n\n\n<p>The text to add : <em>https:\/\/raw.githubusercontent.com\/espressif\/arduino-esp32\/gh-pages\/package_esp32_index.json<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" width=\"830\" height=\"177\" src=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-10.png\" alt=\"\" class=\"wp-image-2876\" srcset=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-10.png 830w, https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-10-300x64.png 300w\" sizes=\"(max-width: 830px) 100vw, 830px\" \/><\/figure>\n\n\n\n<p>Returning to the Boards Manager as above, you should now be able to see the &#8220;esp32 by Espressif Systems&#8221; option when you search.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>From the Tools&gt;Boards sub menu, pick the option <strong>LOLIN S2 MINI<\/strong>.<\/li>\n\n\n\n<li>Open the Blink example from File&gt;Examples&gt;01.Basics&gt;Blink.<\/li>\n\n\n\n<li>Plug in the board using a USB-C cable.<\/li>\n\n\n\n<li>Press and hold the button on the board labelled &#8220;0&#8221;, and briefly press the &#8220;Reset&#8221; button, wait another two seconds and then release the &#8220;0&#8221; button.<\/li>\n\n\n\n<li>Select the board in the Tools&gt;Port menu.<\/li>\n\n\n\n<li>Click the &#8220;Upload&#8221; arrow.<\/li>\n\n\n\n<li>Once the upload has finished, it might show an error, but regardless, press the &#8220;Reset&#8221; button on the board. The onboard LED should start blinking.<\/li>\n<\/ul>\n\n\n\n<p>If you&#8217;re on Linux, you may need to set up USB permissions as per the <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/v4.3-beta2\/esp32s2\/api-guides\/dfu.html#api-guide-dfu-flash-udev\" target=\"_blank\">instructions here<\/a>.<\/p>\n\n\n\n<p><strong>If you have any issues, try a different USB cable.<\/strong> The first one I tried didn&#8217;t work properly (some don&#8217;t have all of the wires inside them).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A More Interesting Example<\/h2>\n\n\n\n<p>The most useful starting point is the provided example found at File&gt;Examples&gt;WiFi&gt;WiFiAccessPoint. This example turns the board into its own WiFi network (separate to the house network). You can use your phone or laptop to connect to this network, and then load one or more web pages served up by a mini web server on the board. I often use this to provide an easy control interface (buttons and feedback). It is also possible to do firmware updates over WiFi, which can be very useful when the controller is buried deep in a machine. Obviously, make sure you use a password on the WiFi to stop other people messing with things.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" width=\"801\" height=\"840\" src=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-8.png\" alt=\"\" class=\"wp-image-2874\" srcset=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-8.png 801w, https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-8-286x300.png 286w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/figure>\n\n\n\n<p>Upload the WiFiAccessPoint example onto the S2 Mini board. I&#8217;m not certain why, but I had to completely power cycle my S2 Mini before the WiFi appeared.<\/p>\n\n\n\n<p>Plug the S2 Mini into a USB port on your computer and open the serial monitor. Using your phone or laptop, connect to the WiFi access point that has the name yourAP. The default password is yourPassword. You should see information appear in the Serial Monitor, including the &#8220;host&#8221; IP. This is probably 192.168.4.1. Go to this address in your browser by entering <a href=\"http:\/\/192.168.4.1\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/192.168.4.1<\/a> or just click that link if you have this page open on the computer you connected to the S2 Mini with.<\/p>\n\n\n\n<p>You should be presented with a simple webpage that has two lines of text, each with a link in it. The two links turn the LED on the board On or Off. Clicking them causes more activity in the serial monitor.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" width=\"826\" height=\"599\" src=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-7.png\" alt=\"\" class=\"wp-image-2873\" srcset=\"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-7.png 826w, https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2024\/12\/image-7-300x218.png 300w\" sizes=\"(max-width: 826px) 100vw, 826px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Getting Started with the ESP32 S2 Mini The ESP32 S2 Mini i s a small development board based on the ESP32-S2FN4R2 chip. The ESP32-S2 Mini by Wemos can be used as an Arduino, which is what this post covers. It can also be programmed in other ways, including with MicroPython, CircuitPython and with the chip [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3156,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[24,13,12,152],"tags":[28,702,703,445,101],"jetpack_featured_media_url":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/wp-content\/uploads\/2025\/12\/1000031111-scaled.jpg","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7g9vY-Ka","_links":{"self":[{"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/posts\/2862"}],"collection":[{"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2862"}],"version-history":[{"count":10,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/posts\/2862\/revisions"}],"predecessor-version":[{"id":3157,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/posts\/2862\/revisions\/3157"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=\/wp\/v2\/media\/3156"}],"wp:attachment":[{"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elephantandchicken.co.uk\/stuffandnonsense\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}