int led = 9;
int Volume = A0;
void setup() {
Serial.begin(9600);
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(Volume, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int volumeRead = analogRead(Volume);
int VolumeMap = map(volumeRead, 0,1023, 0,225);
analogWrite(led, VolumeMap);
}