// Activity 3 Jasmine Parcero 11-Alexandrite
int LED_PIN = 3; //the PMW pin the LED is attached to
// the setup routine runs once when you press reset:
void setup() {
//initialize serial communication at 9600 bits per second:
Serial.begin(9600);
//declare LED pin to be an output:
pinMode (LED_PIN, OUTPUT);
}
//the loop routine runs over and over again forever:
void loop() {
//reads the input on analog pin A0 (value between 0 and 255)
int analogValue = analogRead(A0);
// scales it to brightiness (value between 0 and 255)
int brightness = map (analogValue, 0, 1023, 0, 255);
// sets the brightness LED that connects to pin 3
analogWrite (LED_PIN, brightness);
delay(100);
}