Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ Please complete all circuit implementations and code writing on Tinkercad, and submit the pictures of the circuits you implemented and all the Arduino codes

[Please complete all circuit implementations and code writing on Tinkercad, and submit the pictures of the circuits
you implemented and all the Arduino codes in a pdf file on Blackboard.]
ARDUINO HOMEWORK 1
Question 1[50 pts]:
a) Create a blinking LED using Arduino Uno.
b) Create a traffic light with three LEDs.
c) Build a circuit using a potentiometer where, if the potentiometer output falls below a specified threshold, make an
LED blink; otherwise, keep the LED constantly on.
Question 2[50 pts]:
a) Calculate the cumulative sum of numbers ranging from 0 to 100 using a for loop by iteratively adding them and
display the results at each step in the Serial Monitor.
b) Write a code that iterates through numbers from 100 to 1, divides each number by 3, and displays on the Serial
Monitor only the pairs where the division results in an integer (remainder is 0 when dividing by 3). Print both the
original numbers and their corresponding results.
c) Write an Arduino program that blinks an LED connected to Pin 13 with the following conditions:
Use a for loop to make the LED blink a total of 10 times.
Inside the loop, use an if statement to check if the loop index is an even number.
If the loop index is even, blink the LED twice in quick succession; otherwise, blink it once.
Introduce a while loop to create a short delay between each blink, ensuring the LED blinks at a moderate pace.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions