Take the 2-minute tour ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

Is there a delay function available that does not use millis() which itself makes use of a timer? Does not need to be hyper-exact.

share|improve this question

1 Answer 1

up vote 4 down vote accepted
delayMicroseconds(1000);// maximum delay is 65535 uS

or

#include <util/delay.h>
_delay_ms(1);
share|improve this answer
3  
delayMicroseconds() does not accept long int (32-bits) but only unsigned int (16-bits), hence the maximum you can pass it is 65535. –  jfpoilpret Aug 3 at 13:03
    
Good catch jfpoilpret, thanks. –  Gerben Aug 3 at 17:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.