Sensing the Physical World and Working with Actuators using Arduino

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/36

flashcard set

Earn XP

Description and Tags

Comprehensive practice flashcards reviewing all lessons on pushbutton switches, LDR light sensors, piezo buzzers, sound sensors, servo motor actuation, potentiometer mapping, DHT11 sensors, and I2C LCD integration with Arduino.

37 Terms

1
New cards

[Fill in the Blank] When an Arduino digital input pin is connected to a switch without any reference voltage or pull-up/pull-down resistor, the pin enters an indeterminate state known as a ________ input.

floating — Without a direct connection to either 5 V5\,\text{V} or ground (0 V0\,\text{V}), the input pin acts like an antenna that picks up ambient electromagnetic interference and stray capacitance. This causes digitalRead() to report erratic and fluctuating values between HIGH and LOW.

2
New cards

[True / False] In a pushbutton circuit configured with a pull-down resistor, pressing the button connects the input pin directly to ground, generating a LOW reading.

False — A pull-down resistor ties the pin to ground (0 V0\,\text{V}) to ensure a stable LOW reading while the button is open (unpressed). Pressing the pushbutton closes the circuit to the 5 V5\,\text{V} supply rail, driving the input pin HIGH.

3
New cards

[Multiple Choice] What color band sequence corresponds to a 10 kΩ10\,\text{k}\Omega resistor, commonly utilized as a pull-down resistor in Arduino digital circuits? A) Brown-Black-Orange | B) Brown-Black-Red | C) Red-Black-Orange | D) Yellow-Violet-Brown

A) Brown-Black-Orange — According to the standard 4-band electronic color code, brown denotes the significant digit 11, black denotes 00, and orange represents the decimal multiplier of 10310^3 (1,0001,000), producing 10×1,000 Ω=10,000 Ω10 \times 1,000\,\Omega = 10,000\,\Omega or 10 kΩ10\,\text{k}\Omega.

4
New cards

[Fill in the Blank] In the configuration command Serial.begin(9600);, the number 9600 designates the ________, which defines the data transfer rate in bits per second across the serial channel.

baud rate — The baud rate specifies the modulation and transmission speed of serial data; a setting of 9600 baud9600\,\text{baud} means that the Arduino microcontroller and the computer monitor exchange up to 9,600 bits per second9,600\,\text{bits per second}.

5
New cards

[True / False] In an Arduino C++ sketch, the statement if (val = HIGH) properly compares the variable val to HIGH to verify whether a pushbutton is currently pressed.

False — The single equal sign (=) is the assignment operator that overwrites val with the value of HIGH, whereas the double equal sign (==) is the relational equality comparison operator required inside conditional statements such as if (val == HIGH).

6
New cards
<p>[Multiple Choice] What is the operational distinction between <code>digitalRead()</code> and <code>digitalWrite()</code> in an Arduino program? A) <code>digitalRead()</code> samples input voltage and returns HIGH or LOW, while <code>digitalWrite()</code> applies output voltage | B) <code>digitalRead()</code> sets pin modes, while <code>digitalWrite()</code> returns analog readings | C) Both execute identical voltage queries on internal timers | D) <code>digitalRead()</code> is restricted solely to analog pins A0 through A5</p>

[Multiple Choice] What is the operational distinction between digitalRead() and digitalWrite() in an Arduino program? A) digitalRead() samples input voltage and returns HIGH or LOW, while digitalWrite() applies output voltage | B) digitalRead() sets pin modes, while digitalWrite() returns analog readings | C) Both execute identical voltage queries on internal timers | D) digitalRead() is restricted solely to analog pins A0 through A5

A) digitalRead() samples input voltage and returns HIGH or LOW, while digitalWrite() applies output voltage — digitalRead() interrogates the specified digital pin and returns an evaluated logic state, whereas digitalWrite() drives an output pin to either 5 V5\,\text{V} (HIGH) or ground (LOW).

7
New cards
<p>[Fill in the Blank] In a latching or "sticky" pushbutton sketch, toggling the binary state of <code>ledstate</code> on each button cycle is accomplished using the expression <code>ledstate = \_\_\_\_\_\_\_\_;</code>.</p>

[Fill in the Blank] In a latching or "sticky" pushbutton sketch, toggling the binary state of ledstate on each button cycle is accomplished using the expression ledstate = \_\_\_\_\_\_\_\_;.

!ledstate — The exclamation point (!) represents the logical NOT operator in C++, which flips a boolean or binary state from LOW (00) to HIGH (11) and vice versa, effectively creating toggle or flip-flop switch behavior.

8
New cards

[True / False] Exposing a Cadmium Sulfide (CdS) Light Dependent Resistor (LDR) to higher levels of light intensity causes its internal electrical resistance to increase.

False — Photoexcitation from incident light photons frees charge carriers within the Cadmium Sulfide semiconductor, causing its electrical resistance to drop dramatically. In complete darkness, its resistance rises significantly, impeding electric current flow.

9
New cards

[Multiple Choice] What range of raw integer values does the 10-bit Analog-to-Digital Converter (ADC) of an Arduino Uno yield when reading an analog pin from 0 V0\,\text{V} to 5 V5\,\text{V}? A) 00 to 255255 | B) 00 to 10231023 | C) 00 to 40954095 | D) 11 to 10001000

B) 00 to 10231023 — The Arduino Uno's internal ADC has a resolution of 10 bits, which discretizes an analog input voltage between 0 V0\,\text{V} and 5 V5\,\text{V} into 210=10242^{10} = 1024 discrete quantization levels, spanning numerically from 00 (ground) to 10231023 (5 V5\,\text{V}).

10
New cards

[Fill in the Blank] Unlike digital I/O pins, analog pins A0 through A5 on the Arduino Uno do not require explicit declaration using pinMode() in setup() because they are pre-configured by default as ________.

INPUT — All analog pins automatically initialize in high-impedance input mode upon startup, allowing immediate measurement via analogRead() without calling pinMode(pin, INPUT).

11
New cards

[True / False] On a pre-assembled LDR sensor module, rotating the onboard trimmer potentiometer alters the reference threshold of the internal voltage comparator for the digital output (D0) pin.

True — The onboard trimmer potentiometer adjusts the comparator reference voltage, dictating the exact ambient illumination level at which the module toggles its digital pin (D0) between HIGH and LOW.

12
New cards

[Multiple Choice] Which physical property directly determines the acoustic pitch produced by a piezoelectric buzzer disc? A) The frequency of voltage oscillations applied to the piezoelectric crystal | B) The thickness of the breadboard power rail | C) The baud rate configured in the serial port | D) The resistance value of the pull-down resistor

A) The frequency of voltage oscillations applied to the piezoelectric crystal — Rapidly flexing and relaxing the piezoelectric ceramic disc via alternating electrical impulses causes mechanical vibrations in the air; higher oscillation rates (frequencies measured in Hertz) generate higher audible pitches.

13
New cards

[Fill in the Blank] In the Arduino audio function tone(pin, frequency, duration);, the duration parameter specifies how long the tone will sound in units of ________.

milliseconds — The duration argument is an integer expressed in milliseconds (ms\text{ms}), where a value of 1000 ms1000\,\text{ms} sustains the audio frequency output for exactly 1 second1\,\text{second}.

14
New cards

[True / False] An Arduino sketch can execute tone() on a buzzer while simultaneously driving analog PWM signals via analogWrite() on pins 33 and 1111.

False — The tone() library takes exclusive control of the ATmega328P microcontroller's internal hardware Timer 2, which inadvertently disables PWM (Pulse Width Modulation) generation on digital pins 33 and 1111.

15
New cards

[Multiple Choice] If an Arduino sketch runs tone(buzzerPin, 1000, 400); followed immediately by delay(1000);, how many milliseconds of silence will occur before the next line of code executes? A) 0 ms0\,\text{ms} | B) 400 ms400\,\text{ms} | C) 600 ms600\,\text{ms} | D) 1000 ms1000\,\text{ms}

C) 600 ms600\,\text{ms} — The tone() instruction is non-blocking and executes in the background while program execution moves instantly to delay(1000). The tone sounds for the first 400 ms400\,\text{ms}, leaving the remaining 600 ms600\,\text{ms} (1000 ms−400 ms1000\,\text{ms} - 400\,\text{ms}) as quiet delay time.

16
New cards

[Fill in the Blank] The ________ module is a sound detection sensor featuring an onboard electret microphone and audio amplifier used to create acoustic triggers such as clapper switches.

HW-484 — The HW-484 sensor board samples ambient sound pressure waves, producing an analog voltage output proportional to acoustic intensity as well as an adjustable digital trigger threshold.

17
New cards

[True / False] In robotics, devices such as pneumatic grippers, drills, and welding torches are formally classified as actuators.

False — Grippers, drills, and torches are end effectors (the functional tools interacting with the external workpiece). Actuators are the prime movers (such as DC motors, servo motors, or hydraulic cylinders) that produce the mechanical force driving those end effectors.

18
New cards

[Multiple Choice] What is the typical physical operating rotation angle for the TowerPro SG90 micro servo motor commonly used in educational robotics? A) 0∘0^\circ to 360∘360^\circ continuous | B) 20∘20^\circ to 160∘160^\circ | C) 90∘90^\circ to 270∘270^\circ | D) −90∘-90^\circ to +90∘+90^\circ exclusively

B) 20∘20^\circ to 160∘160^\circ — Although standard full-size hobby servomotors often cover 0∘0^\circ to 180∘180^\circ, compact micro servos like the TowerPro SG90 are physically constrained to a reliable sweep range of approximately 20∘20^\circ to 160∘160^\circ to avoid straining against internal mechanical stops.

19
New cards

[Fill in the Blank] In a standard three-wire hobby servo harness, the red lead connects to positive DC power (5 V5\,\text{V}), the brown/black lead connects to ground, and the yellow/orange lead carries the ________ signal.

PWM (Pulse Width Modulation) — The yellow or orange control line receives timed voltage pulses from an Arduino PWM pin (such as pins 3,5,6,9,103, 5, 6, 9, 10, or 1111) that encode the desired angular shaft position.

20
New cards

[True / False] Powering multiple servo motors directly from the Arduino Uno board's onboard 5 V5\,\text{V} header pin is recommended for high-load robotic applications.

False — Servos draw significant current surges (often hundreds of milliamps to over an amp under mechanical load), which exceeds the current limit of the Arduino's onboard voltage regulator, causing voltage sags, brownouts, and microcontroller resets. An external power supply sharing a common ground should be used.

21
New cards

[Multiple Choice] What does the command map(val, 0, 1023, 10, 170); accomplish in an Arduino sketch? A) Constrains val strictly between 10 and 170 without scaling | B) Linearly scales an integer from an input range of 00 to 10231023 to an output range of 1010 to 170170 | C) Converts an analog voltage to a serial ASCII string | D) Maps pin A0 to digital PWM pin 10

B) Linearly scales an integer from an input range of 00 to 10231023 to an output range of 1010 to 170170 — The map() function uses linear interpolation to translate an input variable from an initial numerical span (e.g., raw ADC readings from 00 to 10231023) into a proportional target span (e.g., servo motor angles from 10∘10^\circ to 170∘170^\circ).

22
New cards

[Fill in the Blank] In Arduino C++ programming, the compound boolean operator that returns true if at least one of the linked conditions evaluates to true is written using the symbol ________.

|| — The double vertical bar (||) represents the logical OR operator, evaluating to true whenever either the left-hand condition, the right-hand condition, or both conditions are satisfied.

23
New cards

[True / False] In the conditional statement while (digitalRead(b1) == HIGH && pos < 160), the servo position variable pos will continue incrementing beyond 160∘160^\circ as long as button b1 is held down.

False — The logical AND operator (&&) requires both sub-expressions to be true; once pos reaches 160160, the condition pos < 160 evaluates to false, terminating the loop and preventing mechanical binding against the servo's physical end stop.

24
New cards

[Multiple Choice] Which internal components allow the DHT11 sensor module to measure both ambient humidity and temperature? A) An optical photodiode and a piezoelectric disc | B) A capacitive humidity-sensing component and an internal thermistor | C) A strain gauge and a Hall effect sensor | D) A thermocouple and a barometric pressure diaphragm

B) A capacitive humidity-sensing component and an internal thermistor — The DHT11 integrates a moisture-holding dielectric substrate whose capacitance varies with relative humidity alongside an NTC thermistor whose electrical resistance varies inversely with temperature.

25
New cards

[Fill in the Blank] When reading from a DHT sensor using the Adafruit library, the standard C++ math function called to evaluate whether the returned reading is invalid or corrupted is ________.

isnan() — The isnan() ('is not a number') function checks whether a floating-point value represents an undefined or unrepresentable numerical result, indicating that data transmission from the sensor failed or timed out.

26
New cards

[True / False] The DHT11 temperature and humidity sensor can be reliably polled in a loop every 50 milliseconds50\,\text{milliseconds} to detect rapid microclimate fluctuations.

False — The DHT11 has an internal measurement conversion period requiring at least 11 to 2 seconds2\,\text{seconds} between successive queries. Reading the sensor more frequently than once every 11–2 seconds2\,\text{seconds} will yield stale data or communication timeout errors.

27
New cards

[Multiple Choice] Which physical header pins provide the hardware I2C bus lines on a standard Arduino Uno microcontroller board? A) Digital pins 0 (RX) and 1 (TX) | B) Analog pins A4 (SDA) and A5 (SCL) | C) Analog pins A0 (SDA) and A1 (SCL) | D) Digital pins 10 (SS) and 11 (MOSI)

B) Analog pins A4 (SDA) and A5 (SCL) — On the ATmega328P microcontroller found on the Arduino Uno, hardware Two-Wire Interface (I2C) communication is hardwired to analog pin A4 for the Serial Data line (SDA) and analog pin A5 for the Serial Clock line (SCL).

28
New cards
<p>[Fill in the Blank] To position the print cursor at the first character of the second row on a 16x2 Liquid Crystal Display, the correct library call is <code>lcd.setCursor(\_\_\_\_\_\_\_\_, \_\_\_\_\_\_\_\_);</code>.</p>

[Fill in the Blank] To position the print cursor at the first character of the second row on a 16x2 Liquid Crystal Display, the correct library call is lcd.setCursor(\_\_\_\_\_\_\_\_, \_\_\_\_\_\_\_\_);.

0, 1 — Column and row indices in the LiquidCrystal_I2C library are zero-indexed. The first parameter specifies the horizontal column (00 for the leftmost column), and the second parameter specifies the vertical row (00 for the top row, 11 for the bottom row).

29
New cards

[True / False] An I2C LCD backpack simplifies display wiring by multiplexing the standard parallel 16-pin LCD interface down to just two communication lines plus power and ground.

True — Standard 4-bit parallel LCD setups require at least 6 dedicated digital microcontroller pins (RS, EN, D4, D5, D6, D7), whereas an I2C backpack uses an onboard PCF8574 expander to drive the LCD via only two I2C lines (SDA and SCL).

30
New cards

[Multiple Choice] Which Arduino Serial method scans incoming serial stream data until a non-digit character is encountered and parses the characters into a signed whole number? A) Serial.read() | B) Serial.readBytes() | C) Serial.parseInt() | D) Serial.available()

C) Serial.parseInt() — Serial.parseInt() skips leading non-numeric ASCII characters, parses consecutive numerical digits arriving in the serial buffer, and returns the converted integer value to the calling variable.

31
New cards

[Fill in the Blank] Before extracting characters from the Arduino serial receive buffer, sketches typically call the method if (Serial.\_\_\_\_\_\_\_\_() > 0) to verify that incoming bytes are waiting to be read.

available — The Serial.available() function returns the number of bytes currently stored in the hardware serial receive buffer, allowing code to check for incoming data before calling read functions.

32
New cards

[True / False] The Arduino function Serial.readStringUntil('\n') reads characters from the serial buffer until a newline character is encountered and returns the captured data as a String object.

True — Serial.readStringUntil(terminator) reads incoming bytes sequentially into a dynamic String variable until the designated terminating delimiter character (such as the newline '\n') is detected or a timeout occurs.

33
New cards

[Multiple Choice] In the Arduino Servo library statement Servo myServo;, what programming construct is myServo? A) A hardware interrupt vector | B) An object instance created from the Servo class | C) A macro defining a PWM pin index | D) A global integer constant holding rotation degrees

B) An object instance created from the Servo class — In C++ Object-Oriented Programming (OOP), Servo is a class containing pre-written servo control routines, and myServo is a specific object instance instantiated to represent and control an individual physical servo motor.

34
New cards

[Fill in the Blank] In a standard four-band resistor color code, the third colored band functions as the decimal ________ by which the value of the first two significant digits is multiplied.

multiplier — The first two bands represent significant numerical digits, the third band represents the power of ten multiplier (10n10^n), and the fourth band denotes the manufacturing tolerance percentage.

35
New cards

[True / False] A passive piezo buzzer module contains an internal oscillating circuit and only requires a constant DC voltage to generate a single continuous tone.

False — An active buzzer contains its own internal oscillating circuit and sounds whenever supplied with steady DC power, whereas a passive buzzer (such as the MH-FMD) requires an external oscillating AC or square-wave signal generated by functions like tone() to vibrate its disc.

36
New cards

[Multiple Choice] What is the lowest frequency in Hertz that can be generated using the built-in Arduino tone() function? A) 0 Hz0\,\text{Hz} | B) 1 Hz1\,\text{Hz} | C) 31 Hz31\,\text{Hz} | D) 100 Hz100\,\text{Hz}

C) 31 Hz31\,\text{Hz} — Due to internal hardware timer prescaler constraints in the AVR architecture, the Arduino tone() library cannot generate frequencies lower than 31 Hz31\,\text{Hz}; entering lower non-zero frequencies produces inaccurate or silent output.

37
New cards

[Fill in the Blank] To associate a defined Servo object with a physical microcontroller pin capable of Pulse Width Modulation, sketches invoke the method myServo.\_\_\_\_\_\_\_\_(pinNumber);.

attach — The .attach() method binds the software Servo object to a designated digital I/O pin and initializes the low-level hardware timer routines that emit the required 50 Hz50\,\text{Hz} servo control pulses.