//Knihovna - potlačenie nelinearity ADC
#include "Arduino.h"
#include <ESP32AnalogRead.h>
ESP32AnalogRead adc;

//funckia - nastavenie pin a seriova komunikacia
void setup()
{
	adc.attach(34);
	Serial.begin(115200);    
}

//funckia - nekonecna slucka, vypočet napatia a tlaku
void loop()
{
	float voltage=(adc.readVoltage()*(27000+11000))/27000;
	float pressure=((345*(float (voltage)-0.5))/4);
	delay(1);
	Serial.println(pressure);
}
