// ACTIVITY 3: LED WITH POTENTIOMETER
const int potPin = A1; // Analog pin connected to potentiometer
const int ledPin = 11; // Digital pin connected to LED
void setup() {
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
int potValue = analogRead(potPin); // Read potentiometer value (0-1023)
int brightness = map(potValue, 0, 1023, 0, 255); // Map potentiometer value to LED brightness (0-255)
analogWrite(ledPin, brightness); // Set LED brightness
delay(10); // Delay for stability
}
//ENCINAS, NICOLE
//SOLAYAO, JAMAICA E.
//12-AMETHYST