Bird
0
0
Arduinoprogramming~10 mins

Stepper motor basics in Arduino - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to include the Stepper library.

Arduino
#include <[1]>
Drag options to blanks, or click blank then click option'
AWire.h
BServo.h
CStepper.h
DSPI.h
Attempts:
3 left
💡 Hint
Common Mistakes
Including Servo.h instead of Stepper.h
Forgetting the angle brackets <>
2fill in blank
medium

Complete the code to create a Stepper object with 200 steps per revolution.

Arduino
Stepper myStepper([1], 8, 9, 10, 11);
Drag options to blanks, or click blank then click option'
A100
B200
C400
D50
Attempts:
3 left
💡 Hint
Common Mistakes
Using 100 or 400 steps which may not match the motor
Confusing pin numbers with steps
3fill in blank
hard

Fix the error in setting the motor speed to 60 RPM.

Arduino
myStepper.[1](60);
Drag options to blanks, or click blank then click option'
Arpm
Bspeed
CmoveSpeed
DsetSpeed
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'speed' as a function instead of 'setSpeed'
Trying to set speed directly as a variable
4fill in blank
hard

Fill both blanks to move the motor 100 steps forward.

Arduino
myStepper.[1]([2]);
Drag options to blanks, or click blank then click option'
Astep
Bmove
C100
D200
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'move' instead of 'step'
Using 200 steps instead of 100
5fill in blank
hard

Fill all three blanks to create a Stepper object with 4 control pins and 100 steps per revolution.

Arduino
[1] [2]([3], 6, 7, 8, 9);
Drag options to blanks, or click blank then click option'
A100
B4
CStepper
Dmotor
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the order of steps and pins
Using variable names instead of class name