DelayMicroseconds()
From Microduino Wiki
void delayMicroseconds (unsigned int us)
Delay (microsecond)
Delay, in microseconds (1ms is equal to 1000micros). If the delay time is thousands of microseconds, delay function is recommended, of which the maximum parameter supported is 16383micos (it maybe changed in the later versions).
- Example
The following code send pulse to the no.8 pin, and every time the pulse lasts 50micos.
int outPin = 8; // digital pin 8 void setup() { pinMode(outPin, OUTPUT); // sets the digital pin as output } void loop() { digitalWrite(outPin, HIGH); // sets the pin on delayMicroseconds(50); // pauses for 50 microseconds digitalWrite(outPin, LOW); // sets the pin off delayMicroseconds(50); // pauses for 50 microseconds }