Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

[platformio]
default_envs = tinypico, lolin32
; default_envs = esp32-s3-devkitc-1_DIY1, esp32dev_DIY1
extra_configs =
platformio_override.ini

Expand All @@ -32,3 +33,46 @@ board = lolin32
platform = [email protected]
build_flags = -Ofast -D USE_I2S_MIC_INPUT -D USE_ESP_NOW
lib_ignore = indicator_led_pico

[env:esp32dev_DIY1]
board = esp32dev
platform = [email protected]
build_flags = -Ofast
-D USE_I2S_MIC_INPUT
-D USE_ESP_NOW
-D I2S_MIC_SERIAL_CLOCK=GPIO_NUM_22
-D I2S_MIC_LEFT_RIGHT_CLOCK=GPIO_NUM_21
-D I2S_MIC_SERIAL_DATA=GPIO_NUM_23
-D I2S_SPEAKER_SERIAL_CLOCK=GPIO_NUM_22
-D I2S_SPEAKER_LEFT_RIGHT_CLOCK=GPIO_NUM_21
-D I2S_SPEAKER_SERIAL_DATA=GPIO_NUM_4
-D I2S_SPEAKER_SD_PIN=-1
-D GPIO_TRANSMIT_BUTTON=GPIO_NUM_33
lib_ignore = indicator_led_pico

monitor_port = COM3
upload_port = COM3
upload_speed = 921600

[env:esp32-s3-devkitc-1_DIY1]
board = esp32-s3-devkitc-1
## https://github.com/espressif/arduino-esp32/issues/7165#issuecomment-1222912986
platform = https://github.com/Jason2866/platform-espressif32.git
build_flags = -Ofast
-D USE_I2S_MIC_INPUT
-D USE_ESP_NOW
-D I2S_MIC_SERIAL_CLOCK=GPIO_NUM_7
-D I2S_MIC_LEFT_RIGHT_CLOCK=GPIO_NUM_6
-D I2S_MIC_SERIAL_DATA=GPIO_NUM_4
-D I2S_SPEAKER_SERIAL_CLOCK=GPIO_NUM_7
-D I2S_SPEAKER_LEFT_RIGHT_CLOCK=GPIO_NUM_6
-D I2S_SPEAKER_SERIAL_DATA=GPIO_NUM_5
-D I2S_SPEAKER_SD_PIN=-1
-D GPIO_TRANSMIT_BUTTON=GPIO_NUM_15
lib_ignore = indicator_led_pico

monitor_port = COM20 ; COM work
upload_port = COM20 ; COM
;monitor_port = COM26 ; USB home
;upload_port = COM26 ; USB
upload_speed = 921600
16 changes: 16 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,39 @@
// Generally they will default to LEFT - but you may need to attach the L/R pin to GND
#define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT
// #define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_RIGHT
#ifndef I2S_MIC_SERIAL_CLOCK
#define I2S_MIC_SERIAL_CLOCK GPIO_NUM_18
#endif
#ifndef I2S_MIC_LEFT_RIGHT_CLOCK
#define I2S_MIC_LEFT_RIGHT_CLOCK GPIO_NUM_19
#endif
#ifndef I2S_MIC_SERIAL_DATA
#define I2S_MIC_SERIAL_DATA GPIO_NUM_21
#endif

// Analog Microphone Settings - ADC1_CHANNEL_7 is GPIO35
#define ADC_MIC_CHANNEL ADC1_CHANNEL_7

// speaker settings
#define USE_I2S_SPEAKER_OUTPUT
#ifndef I2S_SPEAKER_SERIAL_CLOCK
#define I2S_SPEAKER_SERIAL_CLOCK GPIO_NUM_18
#endif
#ifndef I2S_SPEAKER_LEFT_RIGHT_CLOCK
#define I2S_SPEAKER_LEFT_RIGHT_CLOCK GPIO_NUM_19
#endif
#ifndef I2S_SPEAKER_SERIAL_DATA
#define I2S_SPEAKER_SERIAL_DATA GPIO_NUM_5
#endif
// Shutdown line if you have this wired up or -1 if you don't
#ifndef I2S_SPEAKER_SD_PIN
#define I2S_SPEAKER_SD_PIN GPIO_NUM_22
#endif

// transmit button
#ifndef GPIO_TRANSMIT_BUTTON
#define GPIO_TRANSMIT_BUTTON 23
#endif

// Which LED pin do you want to use? TinyPico LED or the builtin LED of a generic ESP32 board?
// Comment out this line to use the builtin LED of a generic ESP32 board
Expand Down