Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please show the arduino wire connections as well Goal of this programming assignment The primary goal of this assignment is to: Become familiar with timer

Please show the arduino wire connections as well image text in transcribed
Goal of this programming assignment The primary goal of this assignment is to: Become familiar with timer interrupt. Requirements 1) Programming language: C++ for Arduino microcontroller 2) Running Environment: Arduino UNO microcontroller. The implementation details Part 1: Using Timer Overflow Interrupt (50 points) 1) Connect LEDs to digital pins 1, 3, 5, and 7. 2) Configure digital pins 1, 3, 5, and 7 as output pins. 3) Set up your timer 2 to interrupt about every 1 second using overflow interrupt. You will have to use appropriate prescaler. 4) Write an ISR with appropriate vector to perform the following tasks. 1) First interrupt will turn on led connected to pin 1. 2) Next interrupt will turn off the led connected to pin 1 and turn on the led connected to pin 3. 3) Next interrupt will turn off the led connected to pin 3 and turn on the led connected to pin 5. 4) Next interrupt will turn off the led connected to pin 5 and turn on the led connected to pin 7. 5) Next interrupt will turn off the led connected to pin 7 and turn on the led connected to pin 1. 6) Repeat steps 2 to 4. 5) In the main loop use serial monitor to communicate with the user. You will: 1) Ask user for a number between 1 and 10. Lets call this x 2) Calculate sum of numbers from 1 to x. 3) Display the result using serial monitor. 4) Repeat steps 1 to 3. Goal of this programming assignment The primary goal of this assignment is to: Become familiar with timer interrupt. Requirements 1) Programming language: C++ for Arduino microcontroller 2) Running Environment: Arduino UNO microcontroller. The implementation details Part 1: Using Timer Overflow Interrupt (50 points) 1) Connect LEDs to digital pins 1, 3, 5, and 7. 2) Configure digital pins 1, 3, 5, and 7 as output pins. 3) Set up your timer 2 to interrupt about every 1 second using overflow interrupt. You will have to use appropriate prescaler. 4) Write an ISR with appropriate vector to perform the following tasks. 1) First interrupt will turn on led connected to pin 1. 2) Next interrupt will turn off the led connected to pin 1 and turn on the led connected to pin 3. 3) Next interrupt will turn off the led connected to pin 3 and turn on the led connected to pin 5. 4) Next interrupt will turn off the led connected to pin 5 and turn on the led connected to pin 7. 5) Next interrupt will turn off the led connected to pin 7 and turn on the led connected to pin 1. 6) Repeat steps 2 to 4. 5) In the main loop use serial monitor to communicate with the user. You will: 1) Ask user for a number between 1 and 10. Lets call this x 2) Calculate sum of numbers from 1 to x. 3) Display the result using serial monitor. 4) Repeat steps 1 to 3

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

Multinational Finance

Authors: Kirt C. Butler

4th Edition

1405181184, 978-1405181181

More Books

Students also viewed these Finance questions