EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / arduino LED blink without delay

arduino LED blink without delay

|

Microcontroller › Arduino › arduino LED blink without delay › arduino LED blink without delay

September 14, 2015 at 5:13 am #13286
Prabakaran P M
Participant
Hi, You can use this code,
 
int led=13,ledstate;
 
int previous=0;
 
int interval=2000;
boolean toggle = false;
 
void setup()
 
{
 
pinMode(led,OUTPUT);
 
}
 
void loop ()
 
{
 
int current=millis();
 
if(current – previous>=interval)
 
{
 
previous=current;
 
  toggle = !toggle;
  digitalWrite(13,toggle);
 
}
}
 

RSS Recent Posts

  • What branch of electronics has easy spare parts sourcing in north africa ? March 6, 2026
  • USING EASYEDA BUT SOMETHING ISN'T RIGHT? March 6, 2026
  • ESP32 Sub Forum March 6, 2026
  • Hello & a Request: Recommendations for obsolete Panasonic filter Capacitors. March 6, 2026
  • Pnp transistor query March 6, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise