Question: Write a program that toggles a LED when clicking on a push button. Note: The needed time for the user to press the push

Write a program that toggles a LED when clicking on a push

 

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.

Step by Step Solution

3.31 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include include tm4c123gh6pmh int main Enable the clock for ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!