| 1234567891011121314151617181920212223242526272829303132 |
- #include <stdio.h>
- #include "freertos/FreeRTOS.h"
- #include "freertos/task.h"
- #include "driver/gpio.h"
- #include "esp_log.h"
- #include "led_strip.h"
- #include "sdkconfig.h"
- #include "Mic.h"
- #include "LED.h"
- static const char *TAG = "main";
- void app_main(void)
- {
- i2c_master_init();
- bsp_codec_adc_init(16000);
- int16_t *my_buffer = heap_caps_malloc(8192,MALLOC_CAP_SPIRAM);
- // int16_t my_buffer[8192];
- //ESP_ERROR_CHECK(esp_board_init(16000, 2, 16));
- //configure_led();
- //LED_init();
- while(1){
- esp_get_mic_level(my_buffer, 8192);
- vTaskDelay(pdMS_TO_TICKS(50));
- }
- }
|