#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "ADC.h"
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
static const char *TAG = "ADC";
void app_main() {
esp_log_level_set("*", ESP_LOG_VERBOSE);
ldr_adc_init();
while (true) {
int raw = read_adc();
ESP_LOGI(TAG, "raw = %4d", raw);
vTaskDelay(pdMS_TO_TICKS(2000));
}
}