main.c 587 B

1234567891011121314151617181920212223242526272829303132
  1. #include <stdio.h>
  2. #include "freertos/FreeRTOS.h"
  3. #include "freertos/task.h"
  4. #include "driver/gpio.h"
  5. #include "esp_log.h"
  6. #include "led_strip.h"
  7. #include "sdkconfig.h"
  8. #include "Mic.h"
  9. #include "LED.h"
  10. static const char *TAG = "main";
  11. void app_main(void)
  12. {
  13. i2c_master_init();
  14. bsp_codec_adc_init(16000);
  15. int16_t *my_buffer = heap_caps_malloc(8192,MALLOC_CAP_SPIRAM);
  16. // int16_t my_buffer[8192];
  17. //ESP_ERROR_CHECK(esp_board_init(16000, 2, 16));
  18. //configure_led();
  19. //LED_init();
  20. while(1){
  21. esp_get_mic_level(my_buffer, 8192);
  22. vTaskDelay(pdMS_TO_TICKS(50));
  23. }
  24. }