[{"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  \n        \u003cp\u003eVery basic primer to get your 7\" Sunton ESP32S3 8048S070 display up and running on Circuit Python with displayio.\u0026nbsp;\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\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/556/original/IMG_0157.JPG?1737936683","metadata":{"caption":""}},{"element_type":"text","content":"\n        \u003ch2\u003eInstallation\u003c/h2\u003e\n\u003cp\u003eSince this board only comes with a \u003ca href=\"https://circuitpython.org/board/sunton_esp32_8048S070/\" target=\"_blank\"\u003e.bin from CircuitPython.org\u003c/a\u003e the easiest way to install Circuit Python is to have a full Python/PIP/ESPTool environment on your PC. Then you can run esptool.py.\u0026nbsp; I have a section in my personal repository on the \u003ca href=\"https://github.com/DJDevon3/My_Circuit_Python_Projects/tree/main/Circuit%20Python%20Snippets#esptoolpy-for-circuit-python-boards\" target=\"_blank\"\u003esteps to flash an ESP device on a Windows PC\u003c/a\u003e once you have Python and PIP installed. The other method is to use the web installer on CircuitPython.org with a Google Chrome browser.\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003eWCH (CH340) USB Serial\u003c/h2\u003e\n\u003cp\u003eUnlike most Circuit Python boards the 8048S070 does not have native usb... there is no USB drive. It's more like a classic ESP32 where you have to communicate with it via serial only. If you miss the good old days of FTDI cables and serial (no one misses those days) then you'll feel right at home.\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003eDevice Manager CH340 Driver\u003c/h2\u003e\n\u003cp\u003eAfter installing Circuit Python and getting the board recognized in device manager it should automatically install the CH340 driver. It's a good idea to double check the serial communication speed.\u0026nbsp;\u003c/p\u003e\n      ","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/558/original/Device_Manager.PNG?1737974913","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eSerial Communication Speed\u003c/h2\u003e\n\u003cp\u003eBy default the Bits per second is 9600.\u0026nbsp; The ESP32-S3 can communicate much faster than that. 128000 works well but if you start seeing communication errors you can drop the speed down for better reliability. 9600 is typically only used for hardware debugging with slower timings. \u003c/p\u003e\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/001/559/original/CH340_BPS.PNG?1737975157","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eThonny IDE\u003c/h2\u003e\n\u003cp\u003eI found \u003ca href=\"https://thonny.org/\" target=\"_blank\"\u003eThonny\u003c/a\u003e works very well as a workflow replacement for Mu. Mu will not work here or at least I couldn't get it to work. You'll need something like Thonny.\u0026nbsp;\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/001/557/original/Thonny.PNG?1737937628","metadata":{"caption":"Thonny Editor with File View"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eESP32-S3 N16R8 Module\u003c/h2\u003e\n\u003cp\u003e16MB (NOR Flash) 8MB (RAM) means this particular module has plenty of storage and ram for big displayio projects. Even though the Sunton 8048S070 has an SD Card reader built in, 16MB is plenty for storing pictures, icons, fonts, spritesheets, etc... on the module itself. The most important aspect of this module for a dotclock display is the 8MB of RAM. When it comes to buffers the more RAM the better. The speed of the RAM is also a factor but without getting into a technical whitepaper let's just say for such a large dimension display the more RAM the better.\u0026nbsp;\u003c/p\u003e\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/001/560/original/ESP32-S3_N16R8_Module.JPG?1737975881","metadata":{"caption":"ESP32-S3 N16R8 Module"}},{"element_type":"text","content":"\n  \n  \n        \u003ch2\u003e8048S070 PCB\u003c/h2\u003e\n\u003cp\u003eThere are a wide variety of plugs for different peripherals including an SD Card slot and Stemma QT port which is directly compatible with Adafruit Stemma QT cables and modules. There is a lot you can do with this board but I'm only covering the basics here. This note is primarily aimed at just getting the board up and running with basic features and displayio.\u003c/p\u003e\n      \n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/561/original/Sunton_PCB.JPG?1737976510","metadata":{"caption":"Sunton 8048S070 PCB"}},{"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        \u003ch2\u003eDot Clock Display\u003c/h2\u003e\n\u003cp\u003eThis board has a dot clock display meaning it has to be constantly refreshed (preferably about 60 times a second).\u0026nbsp; The ESP32-S3 module is well capable of driving this display upwards of 120FPS in a very bare bones state. The more you throw at it the slower it will refresh.\u003c/p\u003e\n\u003cp\u003eThe way the display is setup is more like setting up an RGB Matrix Panel than a TFT because all data is constantly streaming through a buffer.\u0026nbsp; The developers of Circuit Python have created a driver method specifically for these types of displays called the dotclockframebuffer.\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","metadata":{}},{"element_type":"code","content":"fb = dotclockframebuffer.DotClockFramebuffer(**board.TFT_PINS, **board.TFT_TIMINGS)\ndisplay = FramebufferDisplay(fb, auto_refresh=True)","metadata":{"language":"python","linenums":false}},{"element_type":"text","content":"\n  \n        \u003cp\u003eOnce displayio associates it as a dotclock display you can use it the same as you would any TFT including the use of text labels, groups, layers, vectorio objects, images, and of course sensor data from peripherals.\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003eVery Basic Script\u003c/h2\u003e\n\u003cp\u003eThere are no bells and whistles here. Just a blank slate to get you up and running. I have not included the wallpaper image or fonts for download. This is just a basic example.\u0026nbsp;\u003c/p\u003e\n      \n","metadata":{}},{"element_type":"code","content":"# SPDX-FileCopyrightText: 2025 DJDevon3\n# SPDX-License-Identifier: MIT\n# Coded for Circuit Python 9.2.3\n# Sunton ESP32S3 8048S070 Example\n\nimport board\nimport time\nimport terminalio\nimport displayio\nimport dotclockframebuffer\nfrom framebufferio import FramebufferDisplay\nfrom adafruit_display_text import label\nfrom adafruit_bitmap_font import bitmap_font\ndisplayio.release_displays()\n\nfb = dotclockframebuffer.DotClockFramebuffer(**board.TFT_PINS, **board.TFT_TIMINGS)\ndisplay = FramebufferDisplay(fb, auto_refresh=True)\n# print(f\"TFT Timings: {board.TFT_TIMINGS}\")\n\nDISPLAY_WIDTH = 800\nDISPLAY_HEIGHT = 480\n\n# Quick Colors for Labels\nTEXT_BLACK = 0x000000\nTEXT_BLUE = 0x0000FF\nTEXT_CYAN = 0x00FFFF\nTEXT_GRAY = 0x8B8B8B\nTEXT_GREEN = 0x00FF00\nTEXT_LIGHTBLUE = 0x90C7FF\nTEXT_MAGENTA = 0xFF00FF\nTEXT_ORANGE = 0xFFA500\nTEXT_PINK = 0xFF007F\nTEXT_PURPLE = 0x800080\nTEXT_RED = 0xFF0000\nTEXT_WHITE = 0xFFFFFF\nTEXT_YELLOW = 0xFFFF00\n\n\nArial_16 = bitmap_font.load_font(\"/fonts/Arial-16.bdf\")\nGoodTimes_60 = bitmap_font.load_font(\"/fonts/GoodTimesRg-Regular-60.bdf\")\n\n# Load Bitmap to tile grid first (Background layer)\nDiskBMP = displayio.OnDiskBitmap(\"/images/Astral_Fruit_800x480-24bit.bmp\")\nwallpaper = displayio.TileGrid(\n    DiskBMP,\n    pixel_shader=DiskBMP.pixel_shader,\n    tile_width=DISPLAY_WIDTH,\n    tile_height=DISPLAY_HEIGHT,\n)\n\nheader_label = label.Label(Arial_16)\nheader_label.anchor_point = (0.5, 1.0)\nheader_label.anchored_position = (DISPLAY_WIDTH/2, 30)\nheader_label.scale = (1)\nheader_label.color = TEXT_WHITE\n\nfooter_label = label.Label(terminalio.FONT)\nfooter_label.anchor_point = (1.0, 1.0)\nfooter_label.anchored_position = (DISPLAY_WIDTH, DISPLAY_HEIGHT-20)\nfooter_label.scale = (1)\nfooter_label.color = TEXT_WHITE\n\ntemp_label = label.Label(GoodTimes_60)\ntemp_label.anchor_point = (0.5, 1.0)\ntemp_label.anchored_position = (DISPLAY_WIDTH/2, DISPLAY_HEIGHT/2)\ntemp_label.scale = (1)\ntemp_label.color = TEXT_ORANGE\n\nmain_group = displayio.Group()\nwallpaper_group = displayio.Group()\ntext_group = displayio.Group()\nwallpaper_group.append(wallpaper)\ntext_group.append(header_label)\ntext_group.append(footer_label)\ntext_group.append(temp_label)\nmain_group.append(wallpaper_group)\nmain_group.append(text_group)\ndisplay.root_group = main_group\n\nheader_label.text = \"Sunton ESP32-S3 8048S070 Dotclock Display\"\ntemp_label.text = \"CIRCUITPYTHON\"\nfooter_label.text = \"7\\\" 800x480 TFT Display\"\nprint(f\"Board Uptime in Seconds: {time.monotonic()}\") # example for board uptime","metadata":{"language":"python","linenums":false}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://www.aliexpress.us/item/3256804913653723.html\" class=\"parts-name\" target=\"_blank\"\u003eESP32-S3 7\" Smart Display\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003eA 7\" SPI TFT with built in ESP32-S3 module\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://www.aliexpress.us/item/3256804913653723.html\" class=\"parts-url btn-secondary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"ESP32-S3 7\" Smart Display","url":"https://www.aliexpress.us/item/3256804913653723.html","description":"A 7\" SPI TFT with built in ESP32-S3 module","quantity":"1"}}]