Ard Functions-1
Ard Functions-1
Timer functions are used in embedded systems and programming environments to measure
time intervals or trigger actions after specific delays. Below are some commonly used timer
functions:
1. setTimer()
Parameters:
2. getTimer()
Syntax: getTimer(timerID)
Parameters:
3. stopTimer()
Syntax: stopTimer(timerID)
Parameters:
4. restartTimer()
Syntax: restartTimer(timerID)
Parameters:
Communication Functions
These functions are essential for enabling communication between systems or devices, such
as UART, SPI, or I2C communication.
1. Serial.begin()
Syntax: Serial.begin(baudRate)
Parameters:
2. Serial.print()
Syntax: Serial.print(data)
Parameters:
3. Serial.read()
Syntax: Serial.read()
4. I2C.write()
Parameters:
Interrupt Functions
Interrupts are used to respond immediately to certain events, halting the regular program
flow and executing a specific function.
1. attachInterrupt()
2. detachInterrupt()
Syntax: detachInterrupt(pin)
Parameters:
3. interrupts()
Syntax: interrupts()
4. noInterrupts()
Syntax: noInterrupts()
Math Functions
Math functions are used for performing various mathematical operations, such as addition,
subtraction, trigonometry, etc.
1. abs()
Syntax: abs(x)
Parameters:
2. sqrt()
Syntax: sqrt(x)
Parameters:
o x: The number to find the square root of.
3. pow()
Purpose: Returns the value of the first argument raised to the power of the second
argument.
Parameters:
Purpose: Trigonometric functions that return the sine, cosine, and tangent of an
angle, respectively.
Parameters: