{"id":8219,"date":"2024-04-07T08:08:26","date_gmt":"2024-04-07T12:08:26","guid":{"rendered":"https:\/\/www.plastibots.com\/?p=8219"},"modified":"2024-04-18T13:45:22","modified_gmt":"2024-04-18T17:45:22","slug":"falling-pixelsand-on-t-display-s3-esp32","status":"publish","type":"post","link":"https:\/\/www.plastibots.com\/index.php\/2024\/04\/07\/falling-pixelsand-on-t-display-s3-esp32\/","title":{"rendered":"Falling PixelSand on T-Display S3 ESP32"},"content":{"rendered":"\n<div class=\"wp-block-media-text has-media-on-the-right is-stacked-on-mobile\"><div class=\"wp-block-media-text__content\">\n<p>I make and sell <a href=\"https:\/\/www.plastibots.com\/index.php\/2022\/06\/03\/neostrips-mazda-mx-5-nd-nd2-rear-dynamic-led-kit-for-sale-limited-quantities\/\" target=\"_blank\" rel=\"noopener\" title=\"\">NeoIumn8<\/a> which is a dynamic rear LED strip with a number of sequences made for various years of the Mazda Miata ND2+.  For my own ND2, I built wireless controller to remotely change the sequences and have some fun with it.  It&#8217;s mounted in the right side dash vent.  One of the screens takes advantage of an accelerometer to move a doughnut around on the screen (mmmm dooonuts!).  I came across this <a href=\"https:\/\/learn.adafruit.com\/pixeldust-digital-sand-demos-for-arcada\/overview\" target=\"_blank\" rel=\"noopener\" title=\"\">PixelDust <\/a>example and said to myself, self, let&#8217;s do that too and have it dump pixel dust across the screen as I&#8217;m hitting some of the fun roads in the yata.  because why not?!<\/p>\n<\/div><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"639\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2024\/04\/NeoLumn8Controller-1.jpg\" alt=\"\" class=\"wp-image-8221 size-full\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2024\/04\/NeoLumn8Controller-1.jpg 640w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2024\/04\/NeoLumn8Controller-1-300x300.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2024\/04\/NeoLumn8Controller-1-150x150.jpg 150w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"PixelSand Demo on T Display S3\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/utWwxV20-04?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>After digging around, I found an Adafruit library that focuses on LED matrices, and there was also one for a TFT, but is not easily modifiable.  I later came across this <a href=\"https:\/\/github.com\/billism1\/esp32-cheap-yellow-display-examples\" target=\"_blank\" rel=\"noopener\" title=\"\">library <\/a>by Bill over on Github and, with some quick tweaks, modified it to work with the <a href=\"https:\/\/s.click.aliexpress.com\/e\/_DCj5pKD\" target=\"_blank\" rel=\"noopener\" title=\"\">LilyGo T-Display S3<\/a>  with the <a href=\"https:\/\/github.com\/moononournation\/Arduino_GFX\" target=\"_blank\" rel=\"noopener\" title=\"\">Arduino_GFX<\/a> library. Full credit to Bill please, as most of this is his code.  I&#8217;m not done yet, but I&#8217;ve tweaked it so it can be <em>#included<\/em> as a library on it&#8217;s own to reduce clutter.  The main code only needs a few parameters and declarations.  This version uses touch to initiate the sand falling but can easily be modified to work with an accelerometer. There&#8217;s also an option to build the &#8220;hill&#8221; as the pixels drop to the bottom using <em>doPixelSand(1)<\/em> instead of <em>doPixelSand(0)<\/em>.<\/p>\n\n\n\n<p>The below code works for the <a href=\"https:\/\/s.click.aliexpress.com\/e\/_DCj5pKD\" target=\"_blank\" rel=\"noopener\" title=\"\">LilyGo T-Display S3<\/a> display, and on the GFX for Arduino library but should be easily modifiable for TFT e_SPI or others display drivers.  I was also able to easily port it over to the LilyGo T-Display Amoled.   The code was built on PlatformIO but can easily be modified to work in the Arduino IDE.<\/p>\n\n\n<div class=\"sdm_download_button_box_default\"><div class=\"sdm_download_link\"><a href=\"https:\/\/www.plastibots.com\/?sdm_process_download=1&#038;download_id=8224\" class=\"sdm_download green\" title=\"PixelSand\" >Download Now!<\/a><\/div><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I make and sell NeoIumn8 which is a dynamic rear LED strip with a number of sequences made for various years of the Mazda Miata ND2+. For my own ND2, I built wireless controller to remotely change the sequences and have some fun with it. It&#8217;s mounted in the right side dash vent. One of the screens takes advantage of an accelerometer to move a doughnut around on the screen (mmmm dooonuts!). I came across &hellip; <a href=\"https:\/\/www.plastibots.com\/index.php\/2024\/04\/07\/falling-pixelsand-on-t-display-s3-esp32\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":8230,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,190],"tags":[],"class_list":["post-8219","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dyihacks","category-esp32","has_thumb"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2024\/04\/IMG_9880.jpg","jetpack_shortlink":"https:\/\/wp.me\/pK41j-28z","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/8219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/comments?post=8219"}],"version-history":[{"count":5,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/8219\/revisions"}],"predecessor-version":[{"id":8270,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/8219\/revisions\/8270"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media\/8230"}],"wp:attachment":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media?parent=8219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/categories?post=8219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/tags?post=8219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}