void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(3, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int sensorValue = analogRead(A0);
Serial.println("sensorValue:");
Serial.println(sensorValue);
int val =map(sensorValue,0,1023,0,255);
analogWrite(3,val);
Serial.print("pwmValue");
Serial.println(val);
delay(10);
}