1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Potentiometer
What electrical component, equivalent to a series combination of two resistors, provides a variable voltage output connected to an analog pin?
if-elseif-else statement
What conditional statement structure provides the flexibility to perform multiple actions based on multiple values of a variable?
&& (AND operator)
What logical operator is used in the if-elseif-else structure to combine multiple conditions, such as checking if a variable is between 600 and 800?
for loop
What type of loop is used to repeat a set of statements a fixed number of times
while loop
What type of loop is used when you are uncertain about the number of times a task must be repeated (e.g., waiting for a sensor value)?
Inside the setup() function
In the example sketch, where are the statements of the for loop placed when it is meant to run only once at startup?
Array
What structure is used to group multiple input pins or output pins to reduce the number of lines in a sketch
for loop
What loop is used to efficiently access and set the pinMode for all pins grouped in an array?
indexOf() and substring()
What two functions, when used together in a loop, can split a long String based on a separating symbol?
indexOf('!')
What String function is used to find the position of a separating symbol (like '!') within a string?
substring()
What String function is used to extract a portion of a string (from a start position to a symbol's position)?
Interrupt
What is the process where all other sketch executions are stopped and the compiler shifts to a new function due to an external trigger?
attachInterrupt()
What is the function used to set up and detect an interrupt?
PIN of interrupt, function to be called (ISR), and mode of interrupt detection
What are the three arguments taken by the attachInterrupt() function?
Pins 2 and 3
Which two digital pins on an Arduino Uno are dedicated for interrupts?
RISING edge
What is the mode of interrupt detection used when the interrupt is triggered as the signal changes from LOW to HIGH?
Frequency
What property of a sound wave is defined as the number of vibrations per second
Period
What is the term for the duration of one cycle of a square wave?
tone()
What Arduino function is used to generate a sound signal?
pin, frequency, and duration
What are the three arguments used by the tone() function?
PWM pin
To switch on an LED with a particular intensity, what kind of pin must be used?
Serial.write()
What function is specifically used to send a raw 8-bit message (binary value) through serial communication?
switch and case statements
What two statements are combined to create a case-based conditional structure in Arduino programming?
default case
What statement is mandatory in a switch-case block to handle any input value that is not explicitly defined by a case?
break
What keyword is used to exit the switch block after a matching case is executed?
Function: digitalWrite()
Writes the digital output value to a digital pin; only HIGH and LOW values can be written
Function: pinMode()
Sets the mode (input or output) of a pin to be used in the sketch
Function: analogRead()
Reads the analog input from an analog input pin
Function: delay()
Provides delay in milliseconds
Function: delayMicroseconds()
Provides delay in microseconds
Function: abs()
Returns the absolute value of a number
Function: constrain()
Constrains a number to be within a range
Function: map()
Maps one range of numbers with another range
Function: max()
Returns the maximum of the given numbers
Function: min()
Returns the minimum of the given numbers
Function: pow()
Calculates the value of a number raised to a power
Function: sq()
Returns the square of a number
Function: sqrt()
Returns the square root of a number
Function: random()
Generates a pseudo-random number between 0 to the given number
Function: randomSeed()
Initializes the pseudo-random number generator
Function: interrupts()
Enables considering interrupts in the loop function
Function: noInterrupts()
Disables considering interrupts in the loop function
Data type: array
A set of multiple variables stored with index values
Data type: bool
Used for using values true and false only
Data type: byte
tores an unsigned 8-bit number whose value can be between 0 to 255
Data type: char
Used to store characters; single characters must be declared using single quotes
Data type: double
Used to store double-precision floating-point numbers; uses 4 bytes of memory
Data type: float
Floating-point representation used when a number has decimal points; uses 4 bytes
Data type: int
Stores integers in the range -32,768 to 32,767
Data type: string
An array of characters; can be an array of any length characters
What is the maximum number of digital pins on the Arduino Uno that support PWM?
6 (out of 14 digital pins)