Search Header Logo

Arduino Week 5 Homework

Authored by Bayden Schellein

Computers

8th Grade

Used 1+ times

Arduino Week 5 Homework
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

15 questions

Show all answers

1.

LABELING QUESTION

2 mins • 1 pt

Label the different parts of the code

a
b
c
d
Turn LED OFF
Turn LED ON
Create Variable
Use Variable

2.

DRAG AND DROP QUESTION

1 min • 1 pt

Drag and drop the options below to create the following program:

When the light level goes below 700 units, turn on the LED.

int photoresistor = 0;

int led = 10;

void setup() {}

void loop() {

​ (a)  

​ (b)   ​ (c)  

​ (d)   ​ (e)  

}

photoresistor = analogRead (A0);
if (photoresistor < 700) {
digitalWrite(led, HIGH);}
else {
digitalWrite(led, LOW);}

3.

DRAG AND DROP QUESTION

1 min • 1 pt

Drag and drop the correct symbols to complete the below program.

void loop() { if (Esplora.readButton(1) ​ (a)   PRESSED) { ​ (b)   ; } ​ (c)   (Esplora.readButton(2) == ​ (d)   ) { Esplora.writeRGB(0, 0, 255); } }

==
PRESSED
if
Esplora.writeRGB(255, 0, 0)

4.

LABELING QUESTION

2 mins • 1 pt

Identify what the keywords in the code do.

a
b
c
d
If everything is false this will run
This only runs once
This will loop endlessly
This will run if something is true

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times will the shown for loop execute?

0

9

10

11

6.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

What is the command needed for an Arduino to receive information from an analogue device such as potentiometer or similar.

Assume no pin is set and end with ();

(a)  

7.

DRAG AND DROP QUESTION

1 min • 1 pt

Use the code block below to create an IF statement that will do the following:

1 - Check to see if the value from a potentiometer is greater than 0 and less then or equal to 150. 2 - Run a program called RED if true.

​ (a)   ​ (b)   ​ (c)   ​ (d)  

RED();

if
(potentiometer >0
&&
potentiometer <=150)
if, (potentiometer <0, &&, potentiometer >=150)
potentiometer >150)
if, (potentiometer >=0, &,

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?