Advanced Arduino Programming

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/50

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

51 Terms

1
New cards

Potentiometer

What electrical component, equivalent to a series combination of two resistors, provides a variable voltage output connected to an analog pin?

2
New cards

if-elseif-else statement

What conditional statement structure provides the flexibility to perform multiple actions based on multiple values of a variable?

3
New cards

&& (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?

4
New cards

for loop

What type of loop is used to repeat a set of statements a fixed number of times

5
New cards

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)?

6
New cards

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?

7
New cards

Array

What structure is used to group multiple input pins or output pins to reduce the number of lines in a sketch

8
New cards

for loop

What loop is used to efficiently access and set the pinMode for all pins grouped in an array?

9
New cards

indexOf() and substring()

What two functions, when used together in a loop, can split a long String based on a separating symbol?

10
New cards

indexOf('!')

What String function is used to find the position of a separating symbol (like '!') within a string?

11
New cards

substring()

What String function is used to extract a portion of a string (from a start position to a symbol's position)?

12
New cards

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?

13
New cards

attachInterrupt()

What is the function used to set up and detect an interrupt?

14
New cards

PIN of interrupt, function to be called (ISR), and mode of interrupt detection

What are the three arguments taken by the attachInterrupt() function?

15
New cards

Pins 2 and 3

Which two digital pins on an Arduino Uno are dedicated for interrupts?

16
New cards

RISING edge

What is the mode of interrupt detection used when the interrupt is triggered as the signal changes from LOW to HIGH?

17
New cards

Frequency

What property of a sound wave is defined as the number of vibrations per second

18
New cards

Period

What is the term for the duration of one cycle of a square wave?

19
New cards

tone()

What Arduino function is used to generate a sound signal?

20
New cards

pin, frequency, and duration

What are the three arguments used by the tone() function?

21
New cards

PWM pin

To switch on an LED with a particular intensity, what kind of pin must be used?

22
New cards

Serial.write()

What function is specifically used to send a raw 8-bit message (binary value) through serial communication?

23
New cards

switch and case statements

What two statements are combined to create a case-based conditional structure in Arduino programming?

24
New cards

default case

What statement is mandatory in a switch-case block to handle any input value that is not explicitly defined by a case?

25
New cards

break

What keyword is used to exit the switch block after a matching case is executed?

26
New cards

Function: digitalWrite()

Writes the digital output value to a digital pin; only HIGH and LOW values can be written

27
New cards

Function: pinMode()

Sets the mode (input or output) of a pin to be used in the sketch

28
New cards

Function: analogRead()

Reads the analog input from an analog input pin

29
New cards

Function: delay()

Provides delay in milliseconds

30
New cards

Function: delayMicroseconds()

Provides delay in microseconds

31
New cards

Function: abs()

Returns the absolute value of a number

32
New cards

Function: constrain()

Constrains a number to be within a range

33
New cards

Function: map()

Maps one range of numbers with another range

34
New cards

Function: max()

Returns the maximum of the given numbers

35
New cards

Function: min()

Returns the minimum of the given numbers

36
New cards

Function: pow()

Calculates the value of a number raised to a power

37
New cards

Function: sq()

Returns the square of a number

38
New cards

Function: sqrt()

Returns the square root of a number

39
New cards

Function: random()

Generates a pseudo-random number between 0 to the given number

40
New cards

Function: randomSeed()

Initializes the pseudo-random number generator

41
New cards

Function: interrupts()

Enables considering interrupts in the loop function

42
New cards

Function: noInterrupts()

Disables considering interrupts in the loop function

43
New cards

Data type: array

A set of multiple variables stored with index values

44
New cards

Data type: bool

Used for using values true and false only

45
New cards

Data type: byte

tores an unsigned 8-bit number whose value can be between 0 to 255

46
New cards

Data type: char

Used to store characters; single characters must be declared using single quotes

47
New cards

Data type: double

Used to store double-precision floating-point numbers; uses 4 bytes of memory

48
New cards

Data type: float

Floating-point representation used when a number has decimal points; uses 4 bytes

49
New cards

Data type: int

Stores integers in the range -32,768 to 32,767

50
New cards

Data type: string

An array of characters; can be an array of any length characters

51
New cards

What is the maximum number of digital pins on the Arduino Uno that support PWM?

6 (out of 14 digital pins)