Question
i had a hard time understaning this question!! help ! Objective: Rewrite the program BLUE_BLINK.c to randomly blink the triple-color LEDs. Requirement: 1. Restrict to
i had a hard time understaning this question!! help !
Objective: Rewrite the program "BLUE_BLINK.c" to randomly blink the triple-color LEDs.
Requirement: 1. Restrict to the standard color values: 0x02 for Red, 0x04 for Blue, and 0x08 for Green. 2. Each time the launchpad is reset, without any human and external intervening, the triple-color LEDs flash in a random way. What to turn in: 1. A document describing your design. Briefly describe how you achive randomness. Show your flowchart if necessary. 2. Your code.
Hints: 1. Algorithmically there is no true randomness, but you could approximate "randomness". For example, blink the blue LED twice, the red once, the green once, and the red three times, and so on. As long as it is hard to foretell what color is going to flash and how many times of its flashing, it is viewed as pseudo-randomness. 2. textbook Program 3.12 on Page 127 is a good reference, but the function still cannot give us a good randomness. You will need to think of a method of changing the variable 'M'.
Points breakdown: 1. 20 pts for the document explanation of your design (Excellent 20, Very good 15, Good 10, Others 0);2. 10 pts for code structure (nice code structure 10, others 0)3. 20 pts for code performance (code works 20 pts, not works 0 pt).
What could be a perfect performance: Each time you reset the LaunchPad, the blink pattern is totally different.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started