wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PEMBEDS QUIZ #2 (Finals)

Total questions: 13

Worksheet time: 20mins

Name
Class
Date
1.

Scenario: You are building a robotic arm that needs to wave a flag back and forth. You need a motor that can rotate to a specific angle (e.g., 90 degrees) and hold that position. Which type of motor is best suited for this task?

a)

Standard DC Motor

b)

Stepper Motor (without a driver)

c)

Servo Motor

d)

Vibration Motor

2.

Scenario: You connect a servo motor to your Arduino. You wire the brown wire to GND and the red wire to 5V. Where should you connect the orange wire to control the motor using the code provided in the slides?

a)

To the 3.3V pin.

b)
  • To the RESET pin.

c)

To Pin 9

d)

To the VIN pin.

3.

A student writes code to control a servo but forgets to include a specific library at the top of their sketch. The compiler throws an error saying "Servo does not name a type." What line is missing?

a)

#include <Stepper.h>

b)

#include <Servo>

c)

#include <Servo.h>

d)

#include <stepper.h>

4.

You are explaining how a servo motor knows where to move. You mention that the Arduino sends a specific type of signal where the width of the pulse determines the angle. What is this signal called?

a)

Analog Voltage (0-5V)

b)

Serial Communication (UART)

c)

Frequency Modulation (FM)

d)

Pulse-Width Modulation (PWM)

5.

Scenario: Your servo motor is jittering and not holding its position correctly. You suspect the internal system that ensures the motor stays at the desired angle is failing. What is this internal component called?

a)

The PWM Generator

b)

The Stepper Driver

c)

The Gearbox

d)

The Feedback Mechanism

6.

Scenario: You want your robot's head (controlled by a servo) to scan slowly from left to right. In your loop, you use myServo.write(pos) inside a for loop. What is the purpose of the delay(15) command placed after myServo.write(pos)?

a)

To save battery power.

b)

To generate the PWM signal manually.

c)

To give the servo physical time to reach the new position.

d)

To reset the servo's internal counter.

7.

You see the line Servo myServo; in a classmate's code. What is the function of this line?

a)

It creates an instance (object) of the Servo class named myServo.

b)

It attaches the servo to a specific pin.

c)

It sets the servo to the default 0-degree position.

d)

It defines the maximum speed of the servo.

8.

You want to move the servo from 180 degrees back down to 0 degrees. Which for loop structure correctly achieves this?

a)
  • for (int pos = 0; pos <= 180; pos += 1)

b)

for (int pos = 180; pos >= 0; pos -= 1)

c)

for (int pos = 180; pos <= 0; pos += 1)

d)

while (pos < 180)

9.

Scenario: You need your stepper motor to spin faster. You look at the code int motorSpeed = 10;. What unit of measurement does the Stepper library use for this speed setting?

a)

Steps per second

b)

Degrees per second

c)

Percentage (0-100%)

d)

RPM (Revolutions Per Minute)

10.

Scenario: In your code, you write myStepper.step(2048);. Why is the number 2048 specific to this motor?

a)

It is the maximum RPM speed of the motor.

b)

It is the number of milliseconds to delay.

c)

It is the PWM frequency frequency in Hertz.

d)

It is the number of steps required to complete one full 360-degree revolution.

11.

Scenario: You want the stepper motor to rotate exactly one full turn counter-clockwise (backward). Based on the slides, which command should you use?

a)

myStepper.step(2048);

b)

myStepper.step(-2048);

c)

myStepper.setSpeed(-10);

d)

myStepper.write(0);

12.

Scenario: A developer is reviewing the setup() function for a stepper motor project. They see myStepper.setSpeed(motorSpeed);. When does this speed setting take effect?

a)

Only when myStepper.step() is called in the loop.

b)

Immediately, the motor starts spinning.

c)

Only if the button is pressed.

d)

It only affects the delay() function.

13.

Scenario: You observe your stepper motor moving. It rotates fully once, pauses for 1 second, rotates back fully, and pauses for 1 second. Which sequence of code inside void loop() creates this behavior?

a)

myStepper.step(2048); delay(1000); myStepper.step(2048); delay(1000);

b)

myServo.write(180); delay(1000); myServo.write(0); delay(1000);

c)

myStepper.step(2048); delay(1000); myStepper.step(-2048); delay(1000);

d)

digitalWrite(8, HIGH); delay(1000); digitalWrite(8, LOW); delay(1000);