|
| 1 | +=============== |
| 2 | +ESP32-S3-LCD-EV |
| 3 | +=============== |
| 4 | + |
| 5 | +The `ESP32-S3-LCD-EV-Board <https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html>`_ is a small-sized AI development board from Espressif featuring the ESP32-S3 CPU with a touchscreen LCD display, dual microphone, an 16 MB Octal PSRAM and an 16 MB flash. |
| 6 | + |
| 7 | +.. list-table:: |
| 8 | + :align: center |
| 9 | + |
| 10 | + * - .. figure:: esp32s3_lcd_ev.png |
| 11 | + :align: center |
| 12 | + |
| 13 | +Features |
| 14 | +======== |
| 15 | + |
| 16 | + - ESP32-S3 WROOM-1 Module |
| 17 | + - USB Type-C ports |
| 18 | + - Power LED |
| 19 | + - LCD Display |
| 20 | + - MEMS Microphone |
| 21 | + - 16MB Octal PSRAM |
| 22 | + - 16MB SPI Flash |
| 23 | + - RST and BOOT buttons (BOOT accessible to user) |
| 24 | + |
| 25 | +Serial Console |
| 26 | +============== |
| 27 | + |
| 28 | +UART0 is, by default, the serial console. It connects to the on-board |
| 29 | +CP2102 converter and is available on the USB connector USB CON8 (J1). |
| 30 | + |
| 31 | +It will show up as /dev/ttyUSB[n] where [n] will probably be 0. |
| 32 | + |
| 33 | +Buttons and LEDs |
| 34 | +================ |
| 35 | + |
| 36 | +Board Buttons |
| 37 | +------------- |
| 38 | + |
| 39 | +There are two buttons labeled Boot and EN. The EN button is not available |
| 40 | +to software. It pulls the chip enable line that doubles as a reset line. |
| 41 | + |
| 42 | +The BOOT button is connected to IO0. On reset it is used as a strapping |
| 43 | +pin to determine whether the chip boots normally or into the serial |
| 44 | +bootloader. After reset, however, the BOOT button can be used for software |
| 45 | +input. |
| 46 | + |
| 47 | +Board LEDs |
| 48 | +---------- |
| 49 | + |
| 50 | +There are several on-board LEDs for that indicate the presence of power |
| 51 | +and USB activity. None of these are available for use by software. |
| 52 | +Another WS2812 LED is connected to GPIO4. |
| 53 | + |
| 54 | +Configurations |
| 55 | +============== |
| 56 | + |
| 57 | +All of the configurations presented below can be tested by running the following commands:: |
| 58 | + |
| 59 | + $ ./tools/configure.sh esp32s3-lcd-ev:<config_name> |
| 60 | + $ make flash ESPTOOL_PORT=/dev/ttyUSB0 -j |
| 61 | + |
| 62 | +Where <config_name> is the name of board configuration you want to use, i.e.: nsh, buttons, wifi... |
| 63 | +Then use a serial console terminal like ``picocom`` configured to 115200 8N1. |
| 64 | + |
| 65 | +audio |
| 66 | +----- |
| 67 | + |
| 68 | +This configuration uses the I2S0 peripheral and an externally connected audio |
| 69 | +codec to play an audio file streamed over an HTTP connection while connected |
| 70 | +to a Wi-Fi network. |
| 71 | + |
| 72 | +**Audio Codec Setup** |
| 73 | + |
| 74 | +The CS4344 audio codec is connected to the following pins: |
| 75 | + |
| 76 | +============ ========== ============================================ |
| 77 | +ESP32-S3 Pin CS4344 Pin Description |
| 78 | +============ ========== ============================================ |
| 79 | +5 MCLK Master Clock |
| 80 | +16 SCLK Serial Clock |
| 81 | +7 LRCK Left Right Clock (Word Select) |
| 82 | +6 SDIN Serial Data In on CS4344. (DOUT on ESP32-S3) |
| 83 | +============ ========== ============================================ |
| 84 | + |
| 85 | +**Simple HTTP server** |
| 86 | + |
| 87 | +Prepare a PCM-encoded (`.wav`) audio file with 16 or 24 bits/sample (sampled at |
| 88 | +16~48kHz). This file must be placed into a folder in a computer that could |
| 89 | +be accessed on the same Wi-Fi network the ESP32 will be connecting to. |
| 90 | + |
| 91 | +Python provides a simple HTTP server. ``cd`` to the audio file folder on the |
| 92 | +PC and run:: |
| 93 | + |
| 94 | + $ python3 -m http.server |
| 95 | + Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) |
| 96 | + |
| 97 | +Look for your PC IP address and test playing the prepared audio on your |
| 98 | +browser: |
| 99 | + |
| 100 | +.. figure:: esp32s3-audio-config-file.png |
| 101 | + :align: center |
| 102 | + |
| 103 | +After successfully built and flashed, connect the board to the Wi-Fi network:: |
| 104 | + |
| 105 | + nsh> wapi psk wlan0 mypasswd 3 |
| 106 | + nsh> wapi essid wlan0 myssid 1 |
| 107 | + nsh> renew wlan0 |
| 108 | + |
| 109 | +Once connected, open NuttX's player and play the file according to the filename |
| 110 | +and the IP address of the HTTP server:: |
| 111 | + |
| 112 | + nsh> nxplayer |
| 113 | + nxplayer> play http://192.168.1.239:8000/tones.wav |
| 114 | + |
| 115 | +buttons |
| 116 | +------- |
| 117 | + |
| 118 | +This configuration shows the use of the buttons subsystem. It can be used by executing |
| 119 | +the ``buttons`` application and pressing on any of the available board buttons:: |
| 120 | + |
| 121 | + nsh> buttons |
| 122 | + buttons_main: Starting the button_daemon |
| 123 | + buttons_main: button_daemon started |
| 124 | + button_daemon: Running |
| 125 | + button_daemon: Opening /dev/buttons |
| 126 | + button_daemon: Supported BUTTONs 0x01 |
| 127 | + nsh> Sample = 1 |
| 128 | + Sample = 0 |
| 129 | + |
| 130 | +lvgl |
| 131 | +---- |
| 132 | + |
| 133 | +This is a demonstration of the LVGL graphics library running on the NuttX LCD |
| 134 | +driver. You can find LVGL here:: |
| 135 | + |
| 136 | + https://www.lvgl.io/ |
| 137 | + https://github.com/lvgl/lvgl |
| 138 | + |
| 139 | +This configuration uses the LVGL demonstration at `apps/examples/lvgldemo`. |
| 140 | + |
| 141 | +nsh |
| 142 | +--- |
| 143 | + |
| 144 | +Basic NuttShell configuration (console enabled in UART0, exposed via |
| 145 | +USB connection by means of CP2102 converter, at 115200 bps). |
| 146 | + |
| 147 | +ws2812 |
| 148 | +------ |
| 149 | + |
| 150 | +This configuration enables the usage of the RMT peripheral and the example |
| 151 | +``ws2812`` to drive addressable RGB LEDs:: |
| 152 | + |
| 153 | + nsh> ws2812 |
| 154 | + |
| 155 | +Please note that this board contains an on-board WS2812 LED connected to GPIO38 |
| 156 | +and, by default, this config configures the RMT transmitter in the same pin. |
0 commit comments