hi there i'm trying to make an LED blink on and off but the daley i want variable from 5min to 25min
this code seems to turn the LED on and stays on but if i reduce the numbers down from 300000 to 30000 it seems to turn the LED off after 20seconds
any ideas what going on?
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the value from the sensor:
int sensorValue = analogRead(sensorPin);
int sensor = map(sensorValue, 0, 1023, 300000UL, 1500000UL);
// turn the ledPin on
digitalWrite(ledPin, HIGH);
// stop the program for <sensorValue> milliseconds:
delay(sensor);
// turn the ledPin off:
digitalWrite(ledPin, LOW);
// stop the program for for <sensorValue> milliseconds:
delay(sensor);
}