ESPectro32 Library
Library for using ESPectro32 board
 All Classes Functions Variables Enumerations Enumerator Pages
ex_adc.hpp
1 /*
2  * ex_adc.hpp
3  *
4  * Created on: Aug 22, 2017
5  * Author: andri
6  */
7 
8 #ifndef COMPONENTS_ESPECTRO32_EXAMPLES_IDF_EX_ADC_HPP_
9 #define COMPONENTS_ESPECTRO32_EXAMPLES_IDF_EX_ADC_HPP_
10 
11 #include <esp_log.h>
12 #include <ESPectro32_Board.h>
13 
14 const static char *TAG_EX_ADC ="ADC";
15 
16 static void load_ex_adc(){
17  for(;;) {
18  ESP_LOGI(TAG_EX_ADC, "Photo TR: %d %f, Hall Sensor: %d",
19  ESPectro32.readPhotoTransistorValue(),
20  ESPectro32.readPhotoTransistorVoltage(),
21  ESPectro32.readOnBoardHallSensor());
22  vTaskDelay(500/portTICK_PERIOD_MS);
23  }
24 }
25 
26 #endif /* COMPONENTS_ESPECTRO32_EXAMPLES_IDF_EX_ADC_HPP_ */