• abcde Row 1 Row 1 Row 3 IIIBIAIAIAI ཛྱཱ བྷྱཿ ཀཱུ ལྐ ཊཱ ཤྲཱ གཱ ༤ TX RX DIGITAL (PWM-) XO UNO ARDUINO RX+0 ION POWER ANALOG IN Row 4 ON 1 2 3 4 Blank = ། ། ། ། །༄ ཋ ལ ཁ * བཿལ ཟླ ཀྵུ བྷ + a b c d e ароде f g +

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Complete the design and code so that the 4 rows of LEDs flash in sequence from top to bottom.

Functional specifications

  1. One of the two LEDs (red or blue) in each row lights up in the sequence 1-2-3-4.
  2. Each LED stays lit for 1 second before the sequence moves to the next row.
  3. The sequence repeats indefinitely.
  4. Each row is controlled by the corresponding DIP switch. If the switch is OFF, the red LED lights up; if the switch is ON, the blue LED lights up. Only one LED lights up in each row.
  5. If the "Blank" button is pressed and held, no LEDs should light up. The sequence may continue while the button is held, i.e. the sequence does not need to start up exactly where it left off when the button is released.

Additional specifications

  1. You must light up the LEDs using software, i.e. you cannot rewire the switches to correct directly to the LEDs.
  2. You must store pin numbers in logically-organized arrays so that the circuit could easily be rewired with minimal changes to the code.
  3. You must use for loops in your code to simplify repetitive operations. You should be able to add more LED rows and switches, for example, with minimal changes to your code.

int main() {
  init();              // Do some basic setup
  Serial.begin(9600);  // Initialize Serial output
  delay(100);          // Wait 100 milliseconds
  
  // Configure pins HERE
  // ...
  
  while (true) {  // Repeat sequence indefinitely
    
    // Your code here
    // ...
    
  }
  
  delay(100);  // Wait 100 milliseconds
}

•
abcde
Row 1
Row 1
Row 3
IIIBIAIAIAI
ཛྱཱ བྷྱཿ ཀཱུ ལྐ ཊཱ ཤྲཱ གཱ ༤
TX
RX
DIGITAL (PWM-)
XO UNO
ARDUINO
RX+0
ION
POWER
ANALOG IN
Row 4
ON
1 2 3 4
Blank
= ། ། ། ། །༄ ཋ ལ ཁ * བཿལ ཟླ ཀྵུ བྷ
+
a b c d e
ароде
f g
+
Transcribed Image Text:• abcde Row 1 Row 1 Row 3 IIIBIAIAIAI ཛྱཱ བྷྱཿ ཀཱུ ལྐ ཊཱ ཤྲཱ གཱ ༤ TX RX DIGITAL (PWM-) XO UNO ARDUINO RX+0 ION POWER ANALOG IN Row 4 ON 1 2 3 4 Blank = ། ། ། ། །༄ ཋ ལ ཁ * བཿལ ཟླ ཀྵུ བྷ + a b c d e ароде f g +
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY