int B = 3;
int G = 5;
int R = 6;
int valB;
void setup() {
// put your setup code here, to run once:
pinMode(B, OUTPUT);
pinMode(G, OUTPUT);
pinMode(R, OUTPUT);
pinMode(A0, INPUT);
}
void loop() {
// ut your main code here, to run repeatedly:
valB = analogRead(A0);
valB = map(valB, 0, 1023, 0, 255);
analogWrite(B,valB);
analogWrite(G, 100);
analogWrite(R, 100);
}