int val=0;
//int val_1=0;
int temp=0;
//int temp2=0;
const int ledPin=23;
const int freq=5000;
const int ledChannel=0;
const int resolution=12;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// analogReadResolution(9);
ledcSetup(ledChannel, freq, resolution);
ledcAttachPin(ledPin, ledChannel);
}
void loop() {
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
val = analogRead(14);
ledcWrite(ledChannel,val);
Serial.println(val);
/*
val_1 = analogRead(12);
temp = map(val, 0, 4095, 10, 100);
temp2 = map(val_1, 3813, 462, -24, 80);
Serial.println("temp: ");
Serial.println(temp);
Serial.println("val_1: ");
Serial.println(val_1);
Serial.println("temp2: ");
Serial.println(temp2);
*/
}