
- Arduino Tutorial
- Arduino - Home
- Arduino - Overview
- Arduino - Board Description
- Arduino - Installation
- Arduino - Program Structure
- Arduino - Data Types
- Arduino - Variables & Constants
- Arduino - Operators
- Arduino - Control Statements
- Arduino - Loops
- Arduino - Functions
- Arduino - Strings
- Arduino - String Object
- Arduino - Time
- Arduino - Arrays
- Arduino Function Libraries
- Arduino - I/O Functions
- Arduino - Advanced I/O Function
- Arduino - Character Functions
- Arduino - Math Library
- Arduino - Trigonometric Functions
- Arduino Advanced
- Arduino - Due & Zero
- Arduino - Pulse Width Modulation
- Arduino - Random Numbers
- Arduino - Interrupts
- Arduino - Communication
- Arduino - Inter Integrated Circuit
- Arduino - Serial Peripheral Interface
- Arduino Projects
- Arduino - Blinking LED
- Arduino - Fading LED
- Arduino - Reading Analog Voltage
- Arduino - LED Bar Graph
- Arduino - Keyboard Logout
- Arduino - Keyboard Message
- Arduino - Mouse Button Control
- Arduino - Keyboard Serial
- Arduino Sensors
- Arduino - Humidity Sensor
- Arduino - Temperature Sensor
- Arduino - Water Detector / Sensor
- Arduino - PIR Sensor
- Arduino - Ultrasonic Sensor
- Arduino - Connecting Switch
- Motor Control
- Arduino - DC Motor
- Arduino - Servo Motor
- Arduino - Stepper Motor
- Arduino And Sound
- Arduino - Tone Library
- Arduino - Wireless Communication
- Arduino - Network Communication
- Arduino Useful Resources
- Arduino - Quick Guide
- Arduino - Useful Resources
- Arduino - Discussion
Arduino - delayMicroseconds () function
The delayMicroseconds() function accepts a single integer (or number) argument. This number represents the time and is measured in microseconds. There are a thousand microseconds in a millisecond, and a million microseconds in a second.
Currently, the largest value that can produce an accurate delay is 16383. This may change in future Arduino releases. For delays longer than a few thousand microseconds, you should use the delay() function instead.
delayMicroseconds() function Syntax
delayMicroseconds (us) ;
where, us is the number of microseconds to pause (unsigned int)
Example
/* Flashing LED * ------------ * Turns on and off a light emitting diode(LED) connected to a digital * pin, in intervals of 1 seconds. * */ int ledPin = 13; // LED connected to digital pin 13 void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output } void loop() { digitalWrite(ledPin, HIGH); // sets the LED on delayMicroseconds(1000); // waits for a second digitalWrite(ledPin, LOW); // sets the LED off delayMicroseconds(1000); // waits for a second }
arduino_time.htm
Advertisements