Font size
WorksheetsRobotics Week 2
Total questions: 16
Worksheet time: 3mins
How many times will the code inside the
"void setup ()"
run?
Once
Only when called
Forever until the power is cut
How many times will the code inside the
"void loop()"
run?
Once
Only when called
Forever until the power is cut
If I want to
TURN ON AN LED
which function should I use?
digitalRead()
digitalWrite()
analogRead()
analogWrite()
If I want to
CONTROL THE SPEED OF A MOTOR
which function should I use?
digitalRead()
digitalWrite()
analogRead()
analogWrite()
If I want to
IMPLEMENT A BUTTON
which function should I use?
digitalRead()
digitalWrite()
analogRead()
analogWrite()
If I want to
IMPLEMENT A POTENTIOMETER
which function should I use?
digitalRead()
digitalWrite()
analogRead()
analogueWrite()
I want to refer to pin 13 as greenLED in my code.
How can I do that?
#include <greenLED.h>
#define greenLED 13
#define (greenLED, 13)
#define 13 greenLED
Arduino code is case sensitive
TRUE
FALSE
Which timing options will allow me to multitask?
(select all)
delay
delayMicroseconds
millis
micros
Which of these have
parameters but no returns?
(select all)
delay
delayMicroseconds
millis
micros
Which of these have
returns but no parameters?
(select all)
delay
delayMicroseconds
millis
micros
Which of these pseudocodes would have a
duty cycle of about 50%?
(Pin1, HIGH);
delay(400);
(Pin1, LOW);
delay(200);
(Pin1, HIGH);
delay(300);
(Pin1, LOW);
delay(600);
(Pin1, HIGH);
delay(250);
(Pin1, LOW);
delay(250);
Which of these pseudocodes would have a
duty cycle of about 33%?
(Pin1, HIGH);
delay(400);
(Pin1, LOW);
delay(200);
(Pin1, HIGH);
delay(300);
(Pin1, LOW);
delay(600);
(Pin1, HIGH);
delay(250);
(Pin1, LOW);
delay(250);
My sensor is not time critical.
What should I use?
Polling
Interrupt
delay is the same thing as polling
True
False
Serial Monitor is a useful tool
True
False. I am perfect and require no troubleshooting
