void loop() { val = analogRead(gazpin); // reads the value of the gaz (value between 0 and 1023) Serial.println (val); val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180) myservo.write(val); // sets the servo position according to the scaled value

val = analogRead(gazpin); // reads the value of the gaz (value between 0 and 1023) Serial.println (val); val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180) myservo.write(val);

val = analogRead(gazpin); // reads the value of the gaz (value between 0 and 1023) Serial.println (val); serv = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180) myservo.write(serv);

val = analogRead(gazpin); // reads the value of the gaz (value between 0 and 1023) Serial.println (val); val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180) myservo.write(val);

val = analogRead(gazpin); // reads the value of the gaz (value between 0 and 1023) Serial.println (val); serv = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180) myservo.write(serv);