void setup() {
pinMode(5, OUTPUT);
Serial.begin(9600);
// put your setup code here, to run once:
}
void loop() {
float tension= analogRead(A0);
int segundos= (map (tension,0,1023,0,5000));
digitalWrite(5, HIGH);
delay(segundos);
digitalWrite(5, LOW);
delay(segundos);
Serial.println(segundos);
// put your main code here, to run repeatedly:
}