//ADC PINS
//ADC1_CHANNEL_0 = GPIO36
//ADC1_CHANNEL_1 = GPIO37
//ADC1_CHANNEL_2 = GPIO38
//ADC1_CHANNEL_3 = GPIO39
//ADC1_CHANNEL_4 = GPIO32
//ADC1_CHANNEL_5 = GPIO33
//ADC1_CHANNEL_6 = GPIO34
//ADC1_CHANNEL_7 = GPIO35
//ADC Input Voltage range
//ADC_ATTEN_DB_0 100-950mV 0db attenuation
//ADC_ATTEN_DB_2_5 100-1250mW 2.5db attenuation
//ADC_ATTEN_DB_6 100-1750mW 6db attenuation
//ADC_ATTEN_DB_11 100-2450mW 11db attenuation
void setup(){
Serial.begin(9600);
}
void loop(){
float voltage2 = (float)analogRead(34)/4096*3.3;
// float voltage = (float)analogRead(39)/4096*3.3*(28205/27000);
// float voltage = (float)analogRead(39)/4096*3.3;
Serial.print(voltage2,1);
Serial.println("v");
// Serial.print(voltage,1);
// Serial.println("v");
delay(2000);
// https://www.youtube.com/watch?v=S34R4zg03uE
}