Add ESP32-S3 configuration for yoRadio with Polish character support
- Add Taskfile.yml for automated build/upload/monitor tasks - Add platformio.ini configured for ESP32-S3-DevKitC-1 with USB CDC support - Add myoptions.h with hardware configuration: * ILI9341 display (320x240, 3.2") * I2S audio pins (DOUT=16, BCLK=17, LRC=15) * Two rotary encoders * IR receiver support * Russian language mode for Polish characters support - Modify utf8Rus.cpp to support Polish characters: ąćęłńóśźż ĄĆĘŁŃÓŚŹŻ - Add CONFIG_FILES.md with WiFi and playlist configuration guide - Add KONFIGURACJA.md with complete hardware and software documentation - Update examples/myoptions.h with ILI9341 display and encoder configuration
This commit is contained in:
196
Taskfile.yml
Normal file
196
Taskfile.yml
Normal file
@@ -0,0 +1,196 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
PROJECT_DIR: '{{.TASKFILE_DIR}}/yoRadio'
|
||||
PLATFORMIO_INI: '{{.PROJECT_DIR}}/platformio.ini'
|
||||
|
||||
tasks:
|
||||
init:
|
||||
desc: Inicjalizacja projektu PlatformIO
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- |
|
||||
if [ ! -f platformio.ini ]; then
|
||||
cat > platformio.ini << 'EOF'
|
||||
[env:esp32dev]
|
||||
platform = espressif32
|
||||
board = esp32dev
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_speed = 921600
|
||||
board_build.partitions = min_spiffs.csv
|
||||
board_build.flash_mode = dio
|
||||
build_flags =
|
||||
-DCORE_DEBUG_LEVEL=0
|
||||
-DBOARD_HAS_PSRAM
|
||||
lib_deps =
|
||||
adafruit/Adafruit GFX Library
|
||||
adafruit/Adafruit ST7735 and ST7789 Library
|
||||
adafruit/Adafruit SSD1306
|
||||
adafruit/Adafruit PCD8544 Nokia 5110 LCD library
|
||||
adafruit/Adafruit SH110X
|
||||
adafruit/Adafruit SSD1327
|
||||
adafruit/Adafruit ILI9341
|
||||
adafruit/Adafruit SSD1305
|
||||
nkawu/TFT 22 ILI9225
|
||||
mathertel/OneButton
|
||||
crankyoldgit/IRremoteESP8266
|
||||
paulstoffregen/XPT2046_Touchscreen
|
||||
adafruit/RTClib
|
||||
EOF
|
||||
fi
|
||||
status:
|
||||
- test -f "{{.PLATFORMIO_INI}}"
|
||||
|
||||
build:
|
||||
desc: Kompilacja projektu
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
deps: [init]
|
||||
cmds:
|
||||
- pio run
|
||||
sources:
|
||||
- src/**/*.cpp
|
||||
- src/**/*.h
|
||||
- yoRadio.ino
|
||||
generates:
|
||||
- .pio/build/esp32dev/firmware.bin
|
||||
|
||||
upload:
|
||||
desc: Wgranie projektu na ESP32
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
deps: [init]
|
||||
cmds:
|
||||
- pio run --target upload
|
||||
|
||||
upload-port:
|
||||
desc: Wgranie projektu na ESP32 (z wyborem portu)
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
deps: [init]
|
||||
cmds:
|
||||
- pio run --target upload --upload-port {{.CLI_ARGS}}
|
||||
requires:
|
||||
vars: [CLI_ARGS]
|
||||
|
||||
monitor:
|
||||
desc: Monitor szeregowy
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- pio device monitor
|
||||
interactive: true
|
||||
|
||||
clean:
|
||||
desc: Czyszczenie projektu
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- pio run --target clean
|
||||
- rm -rf .pio
|
||||
|
||||
upload-fs:
|
||||
desc: Wgranie systemu plików (SPIFFS) na ESP32
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
deps: [init]
|
||||
cmds:
|
||||
- echo "Sprawdzam pliki konfiguracyjne..."
|
||||
- ls -lh data/data/*.csv || echo "Brak plików CSV"
|
||||
- pio run --target uploadfs
|
||||
preconditions:
|
||||
- sh: test -d data
|
||||
msg: "Katalog 'data' nie istnieje"
|
||||
|
||||
list-ports:
|
||||
desc: Lista dostępnych portów szeregowych
|
||||
cmds:
|
||||
- pio device list
|
||||
|
||||
erase:
|
||||
desc: Wymazanie flash ESP32
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- pio run --target erase
|
||||
|
||||
build-upload:
|
||||
desc: Kompilacja i wgranie projektu
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- task: build
|
||||
- task: upload
|
||||
|
||||
build-upload-monitor:
|
||||
desc: Kompilacja, wgranie i monitor
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- task: build
|
||||
- task: upload
|
||||
- task: monitor
|
||||
|
||||
full-flash:
|
||||
desc: Pełne wgranie (firmware + filesystem)
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- task: build
|
||||
- task: upload
|
||||
- task: upload-fs
|
||||
|
||||
kill-monitor:
|
||||
desc: Zabij procesy blokujące port szeregowy
|
||||
cmds:
|
||||
- pkill -f "pio.*monitor" || true
|
||||
- pkill -f "python.*monitor" || true
|
||||
- sleep 1
|
||||
|
||||
update-libs:
|
||||
desc: Aktualizacja bibliotek
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- pio pkg update
|
||||
|
||||
info:
|
||||
desc: Informacje o projekcie
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- echo "Projekt yoRadio ESP32-S3"
|
||||
- echo "===================="
|
||||
- pio project metadata
|
||||
- echo ""
|
||||
- echo "Dostępne porty:"
|
||||
- pio device list
|
||||
- echo ""
|
||||
- echo "Konfiguracja pinów (myoptions.h):"
|
||||
- echo " Display ILI9341 - TFT_CS=10, TFT_RST=9, TFT_DC=11"
|
||||
- echo " I2S DAC - DOUT=17, BCLK=16, LRC=15"
|
||||
- echo " Encoder1 - L=1, B=2, R=3"
|
||||
- echo " Encoder2 - L=38, B=39, R=40"
|
||||
|
||||
monitor-raw:
|
||||
desc: Monitor bez filtrów (raw output)
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- pio device monitor --raw
|
||||
interactive: true
|
||||
|
||||
reset:
|
||||
desc: Reset ESP32 (hard reset)
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- pio device monitor --echo --eol LF --raw --exit-char 3 -b 115200 -f send_on_enter -f colorize -f time
|
||||
interactive: true
|
||||
|
||||
test-serial:
|
||||
desc: Test prostego programu do sprawdzenia Serial
|
||||
dir: '{{.PROJECT_DIR}}'
|
||||
cmds:
|
||||
- echo "Tworze prosty test Serial..."
|
||||
- |
|
||||
cat > test_platformio.ini << 'EOF'
|
||||
[env:esp32s3-test]
|
||||
platform = espressif32
|
||||
board = esp32-s3-devkitc-1
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
build_flags =
|
||||
-DCORE_DEBUG_LEVEL=5
|
||||
-DARDUINO_USB_MODE=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
EOF
|
||||
- echo "Kompiluje test..."
|
||||
- pio ci --lib="." --board=esp32-s3-devkitc-1 test_serial.ino || echo "Test compilation failed"
|
||||
Reference in New Issue
Block a user