1/36
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.
[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 5V or ground (0V), 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.
[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 (0V) to ensure a stable LOW reading while the button is open (unpressed). Pressing the pushbutton closes the circuit to the 5V supply rail, driving the input pin HIGH.
[Multiple Choice] What color band sequence corresponds to a 10kΩ 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 1, black denotes 0, and orange represents the decimal multiplier of 103 (1,000), producing 10×1,000Ω=10,000Ω or 10kΩ.
[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 9600baud means that the Arduino microcontroller and the computer monitor exchange up to 9,600bits per second.
[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).
![<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>](https://assets.knowt.com/pdf-flow-prod/856f9b64-fde9-4ea2-acfe-b572395dcbbc-figures/2.jpg)
[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 5V (HIGH) or ground (LOW).
![<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>](https://assets.knowt.com/pdf-flow-prod/856f9b64-fde9-4ea2-acfe-b572395dcbbc-figures/4.jpg)
[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 (0) to HIGH (1) and vice versa, effectively creating toggle or flip-flop switch behavior.
[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.
[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 0V to 5V? A) 0 to 255 | B) 0 to 1023 | C) 0 to 4095 | D) 1 to 1000
B) 0 to 1023 — The Arduino Uno's internal ADC has a resolution of 10 bits, which discretizes an analog input voltage between 0V and 5V into 210=1024 discrete quantization levels, spanning numerically from 0 (ground) to 1023 (5V).
[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).
[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.
[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.
[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), where a value of 1000ms sustains the audio frequency output for exactly 1second.
[True / False] An Arduino sketch can execute tone() on a buzzer while simultaneously driving analog PWM signals via analogWrite() on pins 3 and 11.
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 3 and 11.
[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) 0ms | B) 400ms | C) 600ms | D) 1000ms
C) 600ms — 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 400ms, leaving the remaining 600ms (1000ms−400ms) as quiet delay time.
[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.
[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.
[Multiple Choice] What is the typical physical operating rotation angle for the TowerPro SG90 micro servo motor commonly used in educational robotics? A) 0∘ to 360∘ continuous | B) 20∘ to 160∘ | C) 90∘ to 270∘ | D) −90∘ to +90∘ exclusively
B) 20∘ to 160∘ — Although standard full-size hobby servomotors often cover 0∘ to 180∘, compact micro servos like the TowerPro SG90 are physically constrained to a reliable sweep range of approximately 20∘ to 160∘ to avoid straining against internal mechanical stops.
[Fill in the Blank] In a standard three-wire hobby servo harness, the red lead connects to positive DC power (5V), 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,10, or 11) that encode the desired angular shaft position.
[True / False] Powering multiple servo motors directly from the Arduino Uno board's onboard 5V 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.
[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 0 to 1023 to an output range of 10 to 170 | 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 0 to 1023 to an output range of 10 to 170 — The map() function uses linear interpolation to translate an input variable from an initial numerical span (e.g., raw ADC readings from 0 to 1023) into a proportional target span (e.g., servo motor angles from 10∘ to 170∘).
[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.
[True / False] In the conditional statement while (digitalRead(b1) == HIGH && pos < 160), the servo position variable pos will continue incrementing beyond 160∘ as long as button b1 is held down.
False — The logical AND operator (&&) requires both sub-expressions to be true; once pos reaches 160, the condition pos < 160 evaluates to false, terminating the loop and preventing mechanical binding against the servo's physical end stop.
[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.
[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.
[True / False] The DHT11 temperature and humidity sensor can be reliably polled in a loop every 50milliseconds to detect rapid microclimate fluctuations.
False — The DHT11 has an internal measurement conversion period requiring at least 1 to 2seconds between successive queries. Reading the sensor more frequently than once every 1–2seconds will yield stale data or communication timeout errors.
[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).
![<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>](https://assets.knowt.com/pdf-flow-prod/ad160af8-a2f3-4c30-84b9-9f67410c768c-figures/2.jpg)
[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 (0 for the leftmost column), and the second parameter specifies the vertical row (0 for the top row, 1 for the bottom row).
[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).
[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.
[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.
[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.
[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.
[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 (10n), and the fourth band denotes the manufacturing tolerance percentage.
[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.
[Multiple Choice] What is the lowest frequency in Hertz that can be generated using the built-in Arduino tone() function? A) 0Hz | B) 1Hz | C) 31Hz | D) 100Hz
C) 31Hz — Due to internal hardware timer prescaler constraints in the AVR architecture, the Arduino tone() library cannot generate frequencies lower than 31Hz; entering lower non-zero frequencies produces inaccurate or silent output.
[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 50Hz servo control pulses.