Search Header Logo

Basic Arduino Programming

Authored by Jerico Sarcillo

Computers

University

Used 3+ times

Basic Arduino Programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare and initialize an integer variable in Arduino?

int myVariable: 10;

int myVariable = 10;

myVariable integer = 10;

myVariable: int = 10;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you set a digital pin as an output in Arduino?

Configure pinNumber as a PWM output;

Use pinMode(pinNumber, OUTPUT);

Use digitalWrite(pinNumber, HIGH);

Set pinMode(pinNumber, INPUT);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to read a digital input from a pin?

inputRead

pinRead

readDigital

digitalRead

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the setup() function in an Arduino sketch?

To execute the main loop of the sketch.

To handle user input during runtime.

To display output on the serial monitor.

To initialize settings and configurations before the main loop runs.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you turn on an LED connected to pin 13?

Set pinMode(13, INPUT); digitalWrite(13, LOW);

Set pinMode(13, OUTPUT); digitalWrite(13, HIGH);

Set pinMode(13, OUTPUT); digitalWrite(13, LOW);

Set pinMode(13, INPUT); digitalWrite(13, HIGH);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to include a library in an Arduino sketch?

import LibraryName

#include {LibraryName}

#include <library name>

require 'LibraryName'

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to delay execution for a specified time in milliseconds?

wait();

wait_delay();

delay();

pause();

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?