├── EasyEDA └── ESP32-Pirate.json ├── Gerber ├── BOM_ESP32-Pirate.csv ├── Gerber_ESP32-Pirate.zip └── PickAndPlace_ESP32-Pirate.csv ├── Liesmich.md ├── Pictures ├── FlashTool.jpg ├── PCB_Bottom.jpg ├── PCB_Top.jpg ├── finished_PCB.jpg └── serial_connection.jpg └── README.md /Gerber/BOM_ESP32-Pirate.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Gerber/BOM_ESP32-Pirate.csv -------------------------------------------------------------------------------- /Gerber/Gerber_ESP32-Pirate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Gerber/Gerber_ESP32-Pirate.zip -------------------------------------------------------------------------------- /Gerber/PickAndPlace_ESP32-Pirate.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Gerber/PickAndPlace_ESP32-Pirate.csv -------------------------------------------------------------------------------- /Liesmich.md: -------------------------------------------------------------------------------- 1 | # ESP32-PirateAudio 2 | Benötigte Dateien zum Bau eines sehr kompakten Logitech Media Servers Players. 3 | 4 | ## Warum diese Platine entwickelt wurde: 5 | 6 | Ich habe vor einiger Zeit einen Player mit Raspberry Pi Zero und [Pirate Audio Amp HAT](https://shop.pimoroni.com/products/pirate-audio-3w-stereo-amp) gebaut. 7 | Diese kompakte Elektronik fand in einem 3D-gedruckten Gehäuse Platz. 8 | Als dann von Phillipe eine Squeezelite Firmware für den ESP32 Mikrocontroller von Esspressif entwickelt und veröffentlicht wurde, kam die Idee bei mir auf, meinen Player auf den ESP32 umzubauen. Da der Platz in dem Gehäuse maßgeschneidert für den Raspberry Pi Zero ist, 9 | mußte eine Platine in genau diesem Format her. Das Pirate Audio Board wurde speziell für den Raspberry Pi entwickelt, daher mußte auch mein ESP32 Board den 40 Pin Raspberry Pi Header bekommen. Auf dem Pirate Board sind zwei MAX9857 I2S Amps (2x 3W), ein SPI Display mit ST7789 Controller sowie vier Taster verbaut. 10 | Welche Verbindungen nötig sind, um alle Funktionen weiter nutzen zu können, habe ich [dieser Seite](https://de.pinout.xyz/pinout/pirate_audio_3w_amp#) entnommen. 11 | Leider ist dort ein Fehler enthalten, dessen Suche mich einige Zeit gekostet hat. Und zwar wird das Display nicht über einen Spannungsregler von der 5V Spannungsversorgung gespeist, 12 | sondern es bekommt seine 3,3V Spannung direkt vom Raspberry über Pin17. Und zwar nur über Pin17 und nicht über Pin1. 13 | Mein erster Platinenentwurf hat diese Verbindung nicht gehabt. Ich habe zwar 3,3V an Pin1 verbunden, aber eben nicht an Pin17 weitergeführt. 14 | Daher mußte ich diese Brücke nachträglich einlöten. Ich habe den Platinenentwurf inzwischen geändert, jetzt liegt sowohl an Pin1 als auch an Pin17 3,3V an. 15 | Nun funktioniert das Pirate Board einhunderprozentig an meinem ESP32 Board. 16 | 17 | ## Was kann man damit machen: 18 | 19 | Mit dieser Platine in Kombination mit Phillipes Squeezelite-ESP32 Firmware und dem Pirate Audio Amp HAT lässt sich ein sehr kompakter Player für den Logitech-Media-Server (LMS) bauen. Es werden zusätzlich nur noch ein 5V/2A Netzteil sowie ein Paar Lautsprecher benötigt. 20 | Da das Pirate Audio Board die Standard I2S-Schnittstelle des Raspberry Pi verwendet, sollte es auch möglich sein, einen Hifiberry Miniamp zu verwenden, falls man kein Display und keine Tasten benötigt werden. 21 | Einen "großen" Hifiberry Amp kann man nicht ohne Änderungen nutzen, weil dieser zusätzlich die I2C-Schnittstelle (Pin3 und Pin5) benötigt. Diese sind auf meinem Board nicht verdrahtet. 22 | 23 | ## Platine anfertigen und SMD-Bauteile auflöten lassen: 24 | 25 | Das Board wurde mit EasyEDA entworfen. Die Projektdatei befindet sich im Ordner EasyEDA und darf für private Zwecke verwendet und verändert werden. 26 | Mit den hier bereitgestellten Fertigungs-Dateien (Gerber Files) sowie den Dateien BOM.csv (Bauteileliste) und Pick&Place.csv (Bauteilpositionen) kann man bei einem PCB Dienstleister 27 | diese Platine fertigen lassen [z.B. jlcpcb.com](https://jlcpcb.com). 28 | Die Gerber Files müssen als .zip Datei an den Dienstleister übermittelt werden. Diese enthalten alle Daten, um die Platine fertigen zu können. Die meisten mir bekannten Anbieter haben eine Mindestbestellmenge von 5 Stück. Es empfielt sich, die SMD-Bauteile gleich von dem Dienstleister mit auflöten zu lassen. Dafür sind die beiden .csv Dateien nötig. 29 | Die BOM.csv enthält die Bauteileliste. Beim Bestellvorgang ist darauf zu achten, daß die Bauteile durch vorrätige Standard-Parts des Dienstleisters ersetzt werden. Die elektrischen Werte sind dabei unbedingt beizubehalten. Das ESP32 WROVER Modul kann sowohl in der 8MB PSRAM als auch in der 16MB PSRAM Version verwendet werden. Auch die einfach ESP32-WROVER-B bezeichnete Version funktioniert. 30 | Alle Module mit der Bezeichnung WROOM funktionieren nicht, da diese keinen externen PSRAM verbaut haben. 31 | Hinweis: Die durchgesteckten Bauteile (Pin Header, 5V Power Buchse, etc.) lötet man, wenn die Möglichkeit besteht, besser selber. Diese Teile werden auch vom Dienstleister von Hand gelötet, was etwas teuerer ist. Diese Aufgabe bekommt man, ein paar Vorkenntnisse im Löten vorausgesetzt, ganz gut selber hin. 32 | 33 | ## Board-Layout: 34 | 35 | Die folgende Tabelle zeigt die Verbindungen zwischen ESP32 und dem 40 Pin Header: 36 | 37 | | | ESP32-WROVER-B | 40 Pin Header | 38 | | :------------: | :------------: | :------------: | 39 | | 5V | NC | Pin 2 | 40 | | 3,3V | Pin 2 (VCC) | Pin 1, 17 | 41 | | GND | Pin 1, 15, 38 | Pin 6, 9, 14, 20, 25, 30, 34, 39 | 42 | | I2S (Clock) | Pin 16 (GPIO 13) | Pin 12 | 43 | | I2S (Data) | Pin 11(GPIO 26) | Pin 40 | 44 | | I2S (WordSelect) | Pin 12 (GPIO 27) | Pin 35 | 45 | | Amp Enable | Pin 13 (GPIO 14) | Pin 22 | 46 | | SPI (Clock) | Pin 16 (GPIO 13) | Pin 23 | 47 | | SPI (Data) | Pin 36 (GPIO 22) | Pin 19 | 48 | | SPI (DC) | Pin 33 (GPIO 21) | Pin 21 | 49 | | SPI (CS) | Pin 9 (GPIO 33) | Pin 24 | 50 | | Backlight | Pin 8 (GPIO 32) | >Pin 33 | 51 | | Button A | Pin 24 (GPIO 2) | Pin 29 | 52 | | Button B | Pin 26 (GPIO 4) | Pin 31 | 53 | | Button X | Pin 29 (GPIO 5) | Pin 36 | 54 | | Button Y (old) | Pin 30 (GPIO 18) | Pin 18 | 55 | | Button Y (new) | Pin 23 (GPIO 15) | Pin 38 | 56 | | 10 kOhm Pullup | Pin EN | NC | 57 | | Jumper to GND | Pin 25 (GPIO 0) | NC | 58 | 59 | ## Firmware flashen und in Betrieb nehmen: 60 | 61 | Bevor man das Board konfigurieren und in Betrieb nehmen kann, muß die Firmware von Phillipe einmalig geflasht werden. Weitere Updates können OTA über die Weboberfläche durchgeführt werden. 62 | Die aktuelle Firmware (momentan diese: squeezelite-esp32-master-cmake-I2S-4MFlash-16-1.698.zip) sowie eine Anleitung zum Flashen befindet sich [hier](https://github.com/sle118/squeezelite-esp32 "Link"). 63 | Mein ESP32 Board besitzt keinen USB-to-serial Chip, daher ist ein externes Modul zum Flashen notwendig. Ich kann [dieses Modul](https://de.aliexpress.com/item/32828640989.html?albpd=de32828640989&acnt=708-803-3821&aff_platform=aaf&albpg=1240648134658&netw=u&albcp=9599365821&sk=UneMJZVf&trgt=1240648134658&terminal_id=cb90a984c6704024b9d10f47dab3cb43&tmLog=new_Detail&needSmbHouyi=false&albbt=Google_7_shopping&src=google&crea=de32828640989&aff_fcid=0df8fe743af744ffa314b38fcb0b7f42-1625766660782-06276-UneMJZVf&gclid=EAIaIQobChMIrIf4uITU8QIVqhJ7Ch2_jA0NEAQYCyABEgLKgfD_BwE&albag=101872837187&aff_fsk=UneMJZVf&albch=shopping&albagn=888888&isSmbAutoCall=false&aff_trace_key=0df8fe743af744ffa314b38fcb0b7f42-1625766660782-06276-UneMJZVf&device=c&gclsrc=aw.ds) empfehlen. 64 | Um das ESP32 Modul in den Programmiermodus zu versetzen, muss der Jumper geschlossen werden. 65 | 66 | Achtung: Die 5V Spannungsversorgung darf zum Programmieren nicht angeschlossen sein. Das USB-to-Serial Modul muß unbedingt auf 3,3V eingestellt werden! Eine zu hohe Spannung zerstört das ESP32 Modul! 67 | 68 | Die Verkabelung der seriellen Schnittstelle und die Einstellung des ESP32 Flash-Tools finden sich im Verzeichnis Pictures. 69 | Wenn die Firmware erfolgreich geflasht wurde, wird das Flash-Tool beendet, die Verkabelung der seriellen Schnittstelle getrennt und der Jumper wieder geöffnet. 70 | 71 | Danach wird das Pirate Board aufgesteckt und die 5V Versorgungsspannung angeschlossen. 72 | 73 | ## Konfiguration: 74 | 75 | Wie man das Board mit dem wLAN verbindet, kann man ebenfalls auf der GitHub-Seite von Phillipe bzw. [sle118](https://github.com/sle118/squeezelite-esp32) erfahren. 76 | Damit das Board voll funktionsfähig ist, sind folgende Einstellungen vorzunehmen: 77 | 78 | * dac_config
79 | `model=I2S,bck=13,ws=27,do=26` 80 | 81 | * spi_config
82 | `data=21,clk=23,dc=22,host=1` 83 | 84 | * display_config
85 | `SPI,width=240,height=240,cs=33,back=32,speed=32000000,driver=ST7789` 86 | 87 | * set_GPIO
88 | `14=amp` 89 | 90 | * actrls_config
91 | `button` 92 | 93 | * button
94 | `[{"gpio":4, "type": "BUTTON_LOW", "pull":true, "normal":{"pressed": "ACTRLS_VOLDOWN"}}, {"gpio":2, "type": "BUTTON_LOW", "pull":true, "normal":{"pressed": "ACTRLS_VOLUP"}},{"gpio":5, "type": "BUTTON_LOW", "pull":true, "long_press": 500, "normal":{"pressed": "ACTRLS_TOGGLE"}, "longpress":{"pressed": "BCTRLS_RIGHT"}},{"gpio":18, "type": "BUTTON_LOW", "pull":true, "long_press":500, "normal":{"pressed": "BCTRLS_DOWN"}, "longpress":{"pressed": "BCTRLS_LEFT"}}]` 95 | 96 | **Hinweis**: Bei neueren Pirate Boards liegt Taster Y auf einem anderen GPIO, hier ist “gpio“:18 durch “gpio“:15 zu ersetzten. 97 | 98 | In den LMS-Einstellungen muss für die Funktion des Displays noch das ESP32 Plugin installiert werden und nach eigenen Vorlieben konfiguriert werden. Auch hierführ empfehle ich die Anleitung von Phillipe. 99 | 100 | ## Tastenbelegung 101 | 102 | Mit o.g. button Konfiguration sind die vier Tasten folgendermaßen belegt: 103 | 104 | * Taste A:
105 | Lautstärke plus 106 | 107 | * Taste B:
108 | Lautstärke minus 109 | 110 | * Taste X:
111 | kurz drücken = Wiedergabe / Pause
112 | lang drücken = Navigation nach rechts 113 | 114 | * Taste Y:
115 | kurz drücken = Navigation nach unten
116 | lang drücken = Navigation nach links 117 | 118 | Mit dieser Belegung kann man durch die Menüs navigieren und eine Auswahl starten und pausieren. 119 | Die Tasten A und B kann man leider nicht mit einer "Longpress"-Funktion belegen, weil dann sofort das Lautstärkemenü erscheint und die Longpress-Funktion unterdrückt wird. 120 | 121 | ## Haftungsausschluß: 122 | 123 | Ich empfehle die Umsetzung diese Projektes nur, wenn entprechende Vorkenntnisse vorhanden sind. 124 | Unsachgemäßer Einsatz kann zu Schäden führen. Für eventuell entstehende Schäden an Mensch und Technik übernehme ich keine Haftung. 125 | Das Board ist für eine Versorgungsspannung von 5V konzipiert. Falsch dimensionierte Netzteile können die Elektronik zerstören. 126 | Das ESP32 Modul darf ausschließlich mit 3,3V Spannung versorgt werden. 127 | Die Versorgungsspannung von 5V wird von einem Spannungsregler auf 3,3V heruntergeregelt. Beim Anschluss des USB-to-Seriell Moduls ist darauf zu achten, daß max. 3,3 V Spannung an das ESP32 Modul angelegt werden. Der Spannungsregler ist in diesem Fall außer Funktion. 128 | Für den Inhalt der oben verlinkten Seiten übernehme ich keine Verantwortung. 129 | -------------------------------------------------------------------------------- /Pictures/FlashTool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Pictures/FlashTool.jpg -------------------------------------------------------------------------------- /Pictures/PCB_Bottom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Pictures/PCB_Bottom.jpg -------------------------------------------------------------------------------- /Pictures/PCB_Top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Pictures/PCB_Top.jpg -------------------------------------------------------------------------------- /Pictures/finished_PCB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Pictures/finished_PCB.jpg -------------------------------------------------------------------------------- /Pictures/serial_connection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinkerGuy/ESP32-PirateAudio/c0abdf6654f8cb5384886da57c77497ba3272c44/Pictures/serial_connection.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESP32-PirateAudio 2 | Necessary files for building a very compact Logitech Media Server player. 3 | ## Why this board was developed: 4 | 5 | I built a player with Raspberry Pi Zero and [Pirate Audio Amp HAT](https://shop.pimoroni.com/products/pirate-audio-3w-stereo-amp) some time ago. 6 | This compact electronics found a place in a 3D-printed case. 7 | Since Phillipe developed his Squeezelite firmware for Esspressif's ESP32 microcontroller, the idea came to me to convert my player to the ESP32. Since the space in the case is tailor-made for the Raspberry Pi Zero, a board in exactly this format was needed. The Pirate Audio Board was developed especially for the Raspberry Pi, so my ESP32 board had to get the 40 pin Raspberry Pi header as well. 8 | On the Pirate board are two MAX9857 I2S amps (2x 3W), a SPI display with ST7789 controller and four buttons. 9 | Which connections are necessary to be able to use all functions further can be seen on [this page](https://de.pinout.xyz/pinout/pirate_audio_3w_amp#). 10 | Unfortunately there is lack of one needed pin, which took me some time to find. The display is not powered by the 5V supply via a voltage regulator, 11 | but it gets its 3.3V voltage directly from the Raspberry via pin17. And only via pin17 and not via pin1. 12 | My first PCB design did not have this connection. I did connect 3.3V to Pin1, but I did not connect it to Pin17. 13 | Therefore I had to manual solder this bridge. In the meantime I changed the PCB design, now there is 3,3V at Pin1 as well as at Pin17. 14 | Now the Pirate board works well on my ESP32 board. 15 | 16 | ## What can be done with it: 17 | 18 | With this board in combination with Phillipe's Squeezelite ESP32 firmware and the Pirate Audio Amp HAT, you can build a very compact player for the Logitech Media Server (LMS). All that is needed is a 5V/2A power supply and a pair of speakers. 19 | Since the Pirate Audio Board uses the standard I2S interface of the Raspberry Pi, it should also be possible to use a Hifiberry Miniamp if you don't need a display and buttons. 20 | You can't use a "big" Hifiberry Amp without modifications, because it also needs the I2C interface (Pin3 and Pin5). These are not wired on my board. 21 | 22 | ## Make a PCB and solder SMD components: 23 | 24 | The board was designed with EasyEDA. The project file is located in the EasyEDA folder and may be used and modified for private purposes. 25 | With the production files provided here (Gerber Files) as well as the files BOM.csv (component list) and Pick&Place.csv (component positions) you can have a PCB provider ([e.g. jlcpcb.com](https://jlcpcb.com)). 26 | The Gerber files have to be sent as .zip file to the PCB provider. These contain all data to be able to manufacture the PCB. Most of the providers I know have a minimum order quantity of 5 pieces. It is recommended to have the SMD components soldered on by the service provider. For this the two .csv files are necessary. 27 | The BOM.csv contains the component list. When ordering, make sure that the components are replaced by in stock standard parts from the PCB provider. The electrical values must be kept. The ESP32 WROVER module can be used in the 8MB PSRAM as well as in the 16MB PSRAM version. Also the version simply named ESP32-WROVER-B works. 28 | All modules labeled WROOM will not work because they do not have external PSRAM installed. 29 | **Note**: The through-hole components (pin header, 5V power jack, etc.) are better soldered by yourself, if you have the possibility. These parts are also soldered by hand by the service provider, which is a bit more expensive. This task can be done quite well by yourself, provided you have some knowledge in soldering. 30 | 31 | ## Board layout: 32 | 33 | The following table shows the connections between ESP32 and the 40 Pin Header: 34 | 35 | | | ESP32-WROVER-B | 40 Pin Header | 36 | | :------------: | :------------: | :------------: | 37 | | 5V | NC | Pin 2 | 38 | | 3,3V | Pin 2 (VCC) | Pin 1, 17 | 39 | | GND | Pin 1, 15, 38 | Pin 6, 9, 14, 20, 25, 30, 34, 39 | 40 | | I2S (Clock) | Pin 16 (GPIO 13) | Pin 12 | 41 | | I2S (Data) | Pin 11(GPIO 26) | Pin 40 | 42 | | I2S (WordSelect) | Pin 12 (GPIO 27) | Pin 35 | 43 | | Amp Enable | Pin 13 (GPIO 14) | Pin 22 | 44 | | SPI (Clock) | Pin 16 (GPIO 13) | Pin 23 | 45 | | SPI (Data) | Pin 36 (GPIO 22) | Pin 19 | 46 | | SPI (DC) | Pin 33 (GPIO 21) | Pin 21 | 47 | | SPI (CS) | Pin 9 (GPIO 33) | Pin 24 | 48 | | Backlight | Pin 8 (GPIO 32) | Pin 33 | 49 | | Button A | Pin 24 (GPIO 2) | Pin 29 | 50 | | Button B | Pin 26 (GPIO 4) | Pin 31 | 51 | | Button X | Pin 29 (GPIO 5) | Pin 36 | 52 | | Button Y (old) | Pin 30 (GPIO 18) | Pin 18 | 53 | | Button Y (new) | Pin 23 (GPIO 15) | Pin 38 | 54 | | 10 kOhm Pullup | Pin EN | NC | 55 | | Jumper to GND | Pin 25 (GPIO 0) | NC | 56 | 57 | ## Flash the firmware and put it into operation: 58 | 59 | Before you can configure the board and put it into operation, the firmware must be flashed once. Further updates can be done OTA via the web interface. 60 | The current firmware (at the moment this one: squeezelite-esp32-master-cmake-I2S-4MFlash-16-1.698.zip) as well as a manual for flashing can be found [here](https://github.com/sle118/squeezelite-esp32). 61 | My ESP32 board does not have a USB-to-serial chip, so an external module is needed for flashing. I can recommend [this module](https://de.aliexpress.com/item/32828640989.html?albpd=de32828640989&acnt=708-803-3821&aff_platform=aaf&albpg=1240648134658&netw=u&albcp=9599365821&sk=UneMJZVf&trgt=1240648134658&terminal_id=cb90a984c6704024b9d10f47dab3cb43&tmLog=new_Detail&needSmbHouyi=false&albbt=Google_7_shopping&src=google&crea=de32828640989&aff_fcid=0df8fe743af744ffa314b38fcb0b7f42-1625766660782-06276-UneMJZVf&gclid=EAIaIQobChMIrIf4uITU8QIVqhJ7Ch2_jA0NEAQYCyABEgLKgfD_BwE&albag=101872837187&aff_fsk=UneMJZVf&albch=shopping&albagn=888888&isSmbAutoCall=false&aff_trace_key=0df8fe743af744ffa314b38fcb0b7f42-1625766660782-06276-UneMJZVf&device=c&gclsrc=aw.ds). 62 | To put the ESP32 module into programming mode, the jumper must be closed. 63 | 64 | **Attention**: The 5V power supply must not be connected for programming. The USB-to-Serial module must be set to 3.3V! A too high voltage will destroy the ESP32 module! 65 | 66 | The cabling of the serial interface and the setting of the ESP32 flash tool can be found in the pictures directory. 67 | When the firmware has been flashed successfully, the flash tool is closed, the cabling of the serial interface is disconnected and the jumper is opened again. 68 | 69 | Then the Pirate board is plugged in and the 5V supply voltage is connected. 70 | 71 | ## Configuration: 72 | 73 | How to connect the board to the wLAN can also be found on Phillipe's or [sle118's GitHub page](https://github.com/sle118/squeezelite-esp32). 74 | For the board to be fully functional, the following settings need to be made: 75 | 76 | * dac_config
77 | `model=I2S,bck=13,ws=27,do=26` 78 | 79 | * spi_config
80 | `data=21,clk=23,dc=22,host=1` 81 | 82 | * display_config
83 | `SPI,width=240,height=240,cs=33,back=32,speed=10000000,driver=ST7789` 84 | 85 | * set_GPIO
86 | `14=amp` 87 | 88 | * actrls_config
89 | `button` 90 | 91 | * button
92 | `[{"gpio":4, "type": "BUTTON_LOW", "pull":true, "normal":{"pressed": "ACTRLS_VOLDOWN"}}, {"gpio":2, "type": "BUTTON_LOW", "pull":true, "normal":{"pressed": "ACTRLS_VOLUP"}},{"gpio":5, "type": "BUTTON_LOW", "pull":true, "long_press": 500, "normal":{"pressed": "ACTRLS_PLAY"}, "longpress":{"pressed": "BCTRLS_RIGHT"}},{"gpio":18, "type": "BUTTON_LOW", "pull":true, "long_press":500, "normal":{"pressed": "BCTRLS_DOWN"}, "longpress":{"pressed": "BCTRLS_LEFT"}}]` 93 | 94 | **Note**: On newer Pirate boards button Y is on a different GPIO, here "gpio":18 has to be replaced by "gpio":15. 95 | 96 | In the LMS settings you have to install the ESP32 plugin for the display function and configure it according to your preferences. Again, I recommend the instructions from Phillipe. 97 | 98 | ## Key assignment 99 | 100 | With above button configuration, the four keys are assigned as follows: 101 | 102 | * Button A:
103 | Volume up 104 | 105 | * Button B:
106 | Volume down 107 | 108 | * Button X:
109 | short press = play
110 | long press = navigation right 111 | 112 | * Button Y:
113 | short press = navigation down
114 | long press = navigation left 115 | 116 | With this assignment you can navigate through the menus and start a selection. 117 | The keys A and B can unfortunately not be assigned with a "longpress" function, because then the volume menu appears immediately and the longpress function is suppressed. 118 | 119 | ## Disclaimer: 120 | 121 | I recommend the implementation of this project only if appropriate prior knowledge is available. 122 | Improper use can lead to damage. I assume no liability for any damage to people and technology. 123 | The board is designed for a supply voltage of 5V. Wrongly dimensioned power supplies can destroy the electronics. 124 | The ESP32 module may only be supplied with 3.3V voltage. 125 | The supply voltage of 5V is regulated down to 3.3V by a voltage regulator. When connecting the USB-to-serial module, make sure that max. 3.3V voltage is applied to the ESP32 module. In this case the voltage regulator is out of function. 126 | I am not responsible for the content of the linked pages above. 127 | --------------------------------------------------------------------------------