Arduino for Beginners - 2022 Complete Course - Get the Time with millis() and micros ()

Arduino for Beginners - 2022 Complete Course - Get the Time with millis() and micros ()

Assessment

Interactive Video

Information Technology (IT), Architecture, Religious Studies, Other, Social Studies

University

Hard

Created by

Quizizz Content

FREE Resource

This video tutorial explains how to use time functions in Arduino, focusing on the Millis function to get the current time since the program started. It covers the use of unsigned long data types to store time values, best practices for naming variables to avoid conflicts, and demonstrates how to print time using the serial monitor. Additionally, it introduces the Micro function for more precise time measurement in microseconds.

Read more

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the Millis function in Arduino return?

The time in seconds since the program started

The current date and time

The time since the Arduino was powered on

The time since the program started

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is the unsigned long data type used to store time values from Millis?

Because it can store characters

Because it can store only positive numbers

Because it can store decimal numbers

Because it can store negative numbers

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What should you do if a variable name turns orange in the Arduino IDE?

Use it as a function name

Ignore the color

Change the name to avoid conflicts

Use it as it is

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you press the reset button on the Arduino?

The program ends

The program pauses

The program restarts and Millis returns 0

The program continues from where it stopped

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of using a delay in an Arduino program?

To stop the program

To slow down the execution

To create a pause between actions

To speed up the execution

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between Millis and Micros functions?

Millis gives time in seconds, Micros in milliseconds

Millis gives time in milliseconds, Micros in microseconds

Millis gives time in microseconds, Micros in milliseconds

Millis gives time in hours, Micros in minutes

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function would you use for more precise time measurement than Millis?

Delay

Millis

Micros

Serial