// #define TRIG_PIN 14
// #define ECHO_PIN 25
// void setup() {
// Serial.begin(9600);
// pinMode(TRIG_PIN, OUTPUT);
// pinMode(ECHO_PIN, INPUT);
// }
// void loop() {
// digitalWrite(TRIG_PIN, LOW);
// delayMicroseconds(2);
// digitalWrite(TRIG_PIN, HIGH);
// delayMicroseconds(10);
// digitalWrite(TRIG_PIN, LOW);
// float duration = pulseIn(ECHO_PIN, HIGH);
// float distance = duration * 0.034 / 2;
// Serial.print("Distance: ");
// Serial.print(distance);
// Serial.println(" cm");
// delay(1000);
// }
#define POT_PIN 2
void setup() {
Serial.begin(9600);
pinMode(POT_PIN, INPUT);
}
void loop() {
int potValue = analogRead(POT_PIN);
int mappedPotValue = map(potValue, 0, 4095, 0, 1023);
Serial.print("Potentiometer Value: ");
Serial.println(mappedPotValue);
delay(1000);
}