#define in1 9
#define in2 10
#define in3 4
#define in4 5
#define pot 0

int valor = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  //pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  //pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  valor = analogRead(pot);
  valor = map(valor, 0, 1023, 0, 255);
  Serial.print("valor = ");
  Serial.println(valor);
  analogWrite(in1, valor);
  digitalWrite(in2, LOW);

}
