Use your Esp32 to play and control music from a bluetooth audio source.
- Esp32: either use a dev kit or design your pcb (mine will come soon!)
- KY-040 rotary encoder
- ILI9488 3.5" TFT display. There's 2 version of this display: with and without touch screen. This project does not use the touch screen.
The project is still in progress, but this is what it looks like so far:
Instal the Expressif IDF framework or just make your life easier and just use the espressif/idf
docker image.
docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp -it espressif/idf idf.py set-target esp32
docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp -it espressif/idf idf.py menuconfig
In this step you can choose your configuration, like the preferred pinout. For the default configuration and pinout look below.
docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp -it espressif/idf idf.py build
docker run --rm -v $PWD:/project -w /project -e HOME=/tmp --privileged -it espressif/idf idf.py -p /dev/ttyUSB0 flash monitor
Note: you need to give the container permission to access the Esp device.
├── CMakeLists.txt : Project's CMake file
├── components
│ ├── drabaioli__ili9488_display : IDF component to handle ILI9488 TFT display
│ ├── drabaioli__lvgl_ui : IDF component to handle LVGL grapical library bootstrap
│ └── drabaioli__rotary_encoder_ky040 : IDF component to handle KY-040 rotary encoder
└── main : Main logic
└── ui : GUI
All components are designed to be reusable.
pin name | value |
---|---|
SPI_MISO | 32 |
SPI_MOSI | 2 |
SPI_CLOCK | 23 |
TFT_CS | 15 |
TFT_RESET | 21 |
TFT_DC | 4 |
TFT_BACKLIGHT | 18 |
pin name | value |
---|---|
KY040_SW | 27 |
KY040_DT | 26 |
KY040_CLK | 25 |