In compliance with high industry standards

Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria

How to pause the execution of the code using Arduino IDE with microseconds


In this post it will be seen how to pause the execution code for a certain time in microseconds.  Basically this function pauses the program for a certain time and after this time it continues as normal. 

The function for pause the execution code for a certain time in microseconds using Arduino IDE is delayMicroseconds()  This function is used to set a time of pause.


Ethernet or 20 I/Os PLC:      Ethernet PLC     20 I/Os PLC     

 Industrial Shields boards:   Industrial Shields Boards




microseconds: time expressed in milliseconds -> 1000ms = 1 sec


Code Example, blinking of an analog outputs every 0,5ms:

void setup() {
  pinMode(A0_5, OUTPUT); // configure A0.5 as OUTPUT

void loop() {
  analogWrite(A0_5, 0);
  delayMicroseconds(500);         // delay 0,5ms
  analogWrite(A0_5, 255); 

Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

Industrial PLC controller comparison >>

Do you want more information?

Just fill the form!

Tell me more!