Write a program that toggles a LED when clicking on a push button. Note: The needed...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that toggles a LED when clicking on a push button. Note: The needed time for the user to press the push button is approximately 200 ms, the speed of the TM4C123G controller is very high, so 'while true' loop will be executed a lot of times through this period (200 ms), which means that the button has been pressed many times, but in fact the user did it just once!. Therefore, you need some delay after button clicking detection. 2- Write a program that change the color of the onboard LED by using the two onboard push button keys. When the board is turned on, only the Red LED should be on. When the right-side key is pressed, the Green LED should be on (alone), and when the left-side key is pressed, the blue LED should be on alone. Write a program that toggles a LED when clicking on a push button. Note: The needed time for the user to press the push button is approximately 200 ms, the speed of the TM4C123G controller is very high, so 'while true' loop will be executed a lot of times through this period (200 ms), which means that the button has been pressed many times, but in fact the user did it just once!. Therefore, you need some delay after button clicking detection. 2- Write a program that change the color of the onboard LED by using the two onboard push button keys. When the board is turned on, only the Red LED should be on. When the right-side key is pressed, the Green LED should be on (alone), and when the left-side key is pressed, the blue LED should be on alone.
Expert Answer:
Answer rating: 100% (QA)
include include tm4c123gh6pmh int main Enable the clock for ... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
For this program you will write a program that will do the following: Read in the numbers from the text file (Values.txt) and store those values in an array. You will declare the array of size 20....
-
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample run:...
-
Write a program that takes as input an arithmetic expression. The program outputs whether the expression contains matching grouping symbols. For example, the arithmetic expression {25 + (3- 6)*8} and...
-
Assume that global lightning on the Earth constitutes a constant current of 1.00 kA between the ground and an atmospheric layer at potential 260 kV. (a) Find the power of terrestrial lightning. (b)...
-
KOM pays the following insurance premiums during 2011: Auto accident and liability insurance: Paid 1/1/11 Coverage period 1/1/1112/31/11 ...... $3,500 Fire, storm, and other casualty insurance: Paid...
-
What considerations determine whether a special journal should be brought into use rather than placing entries in the general journal? Is the need for a general journal ever eliminated?
-
An electron that has a kinetic energy of \(7.5 \times 10^{-17} \mathrm{~J}\) moves in a circular orbit perpendicular to a uniform magnetic field of magnitude 0. 35 T. For this electron, determine...
-
On January 1, 2012, Acker Inc. had the following balance sheet. The accumulated other comprehensive income related to unrealized holding gains on available-for-sale securities. The fair value of...
-
24. A water jet whose cross section area is a striker wall making an angle e with the normal and rebounds elastically. The velocity of water of density d is v. Force exerted on wall is :- 0 (1) 2avd...
-
Meg McIntyre opened a public relations firm called Pop Chart on August 1, 2024. The following amounts summarize her business on August 31, 2024: During September 2024, the business completed the...
-
A bar is supported with a pin support as shown. Determine the maximum force, F, that could be applied to the bar when considering each type of stress listed below. The dimensions of the bar are shown...
-
A football is inflated in the locker room before the game. The air warms as it is pumped, so it enters the ball at a temperature of 27C. The ball is inflated to a gauge pressure of 13 psi. The ball...
-
A California geothermal power plant generates 4.3 MW by extracting 24 MW of heat from an underground source at 108C and then discharging waste heat into the 17C air. a. What is the actual efficiency...
-
Some runners train with parachutes that trail behind them to provide a large drag force. These parachutes are designed to have a large drag coefficient. One model expands to a square 1.8 m on a side,...
-
A nerve impulse is propagated across a synapse when the neurotransmitter acetylcholine is released from the pre-synaptic membrane and diffuses across the 20-nm-wide synaptic cleft to the...
-
Swordfish are capable of stunning output power for short bursts. A 650 kg swordfish has a cross-section area of 0.92 m 2 and a drag coefficient of 0.0091exceptionally low due to a number of...
-
Consider an investment portfolio that consists of three different stocks, with the amount invested in each asset shown below. Assume the risk-free rate is 4% and the market risk premium is 6%. Use...
-
Carlton Stokes owns and operates a car-detailing business named SuperShine & Detailing. For $150, Carltons business will hand wash and wax customers cars, vacuum the interior, and thoroughly clean...
-
The net heat exchange by radiation from plate 1 with radius b to plate 2 with radius a that are separated by a distance c is given by: q = b2F12(T41 T42) Where T1 and T2 are the absolute...
-
Write a user-defined function that fits data points to a power function of the form y = bxm. Name the function [b, m] = powerfit (x,y), where the input arguments x and y are vectors with the...
-
Write a user-defined function that determines the mode of a set of data (the value in the set that occurs most often). For the function name and arguments, use m=mostfrq (x). The input to the...
-
The manager of the 'D' Division is considering investing in a replacement machine at the beginning of next year, 2020. If the investment does not go ahead, then the divisional results for '...
-
Nielsen Ltd has two divisions with the following information: Division A has been offered a project costing $\$ 100,000$ and giving annual returns of $\$ 20,000$. Division $B$ has been offered a...
-
Division A has been offered a project costing $\$ 100,000$ and giving annual returns of $\$ 20,000$. Division $B$ has been offered a project costing $\$ 100,000$ and giving annual returns of $\$...
Study smarter with the SolutionInn App