const int LEDpin = 3;
const long onDuration = 100;// OFF time for LED
const long offDuration = 500;// ON time for LED
int LEDState = HIGH; // initial state of LED

long rememberTime = 0; // this is used by the code

void setup() {
  pinMode(LEDpin, OUTPUT); // define LEDpin as output
  digitalWrite(LEDpin, LEDState); // set initial state
}

void loop() {
  // LED blink with millis

  if ( LEDState == HIGH )
  {
    if ( (millis() - rememberTime) >= onDuration) {
      LEDState = LOW;// change the state of LED
      rememberTime = millis(); // remember Current millis() time
    }
  }
  else
  {
    if ( (millis() - rememberTime) >= offDuration) {
      LEDState = HIGH; // change the state of LED
      rememberTime = millis(); // remember Current millis() time
    }
  }

  digitalWrite(LEDpin, LEDState); // turn the LED ON or OFF

}// loop ends
nano:12
nano:11
nano:10
nano:9
nano:8
nano:7
nano:6
nano:5
nano:4
nano:3
nano:2
nano:GND.2
nano:RESET.2
nano:0
nano:1
nano:13
nano:3.3V
nano:AREF
nano:A0
nano:A1
nano:A2
nano:A3
nano:A4
nano:A5
nano:A6
nano:A7
nano:5V
nano:RESET
nano:GND.1
nano:VIN
nano:12.2
nano:5V.2
nano:13.2
nano:11.2
nano:RESET.3
nano:GND.3
led1:A
led1:C