Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with C++ coding problem We are asked to Create a program that blinks the LED when the button is pressed and KEEPS COUNT of

Help with C++ coding problem

We are asked to Create a program that blinks the LED when the button is pressed and KEEPS COUNT of the number of times the button has been pressed.

image text in transcribedimage text in transcribed

We are asked to Create a program that blinks the LED when the button is pressed and KEEPS COUNT of the number of times the button has been pressed.

polling key press LaunchPad F5529 has two user buttons: S1 is connected at port 2 BITI (P2.1. S2 is at port 1 B?TI (P1.1 ) User Buttons User LEDs S1 R30 P21 12 LED2 ?? R29 ND GND I LED1 PWR 470R There are two ways of knowing if a key has been pressed, interrupt or polling. We will do the polling here using previous code and add a simple polling loop to observe the value of P1.1. Note that before the BIT1 can be observed, we need to turn on the "intenal pull up resister" on BIT1, otherwise, there is no voltage supplied to the key button. If you are not famillar with the BITWISE operation (AND, OR, XOR, NOT), check this page. polling key press LaunchPad F5529 has two user buttons: S1 is connected at port 2 BITI (P2.1. S2 is at port 1 B?TI (P1.1 ) User Buttons User LEDs S1 R30 P21 12 LED2 ?? R29 ND GND I LED1 PWR 470R There are two ways of knowing if a key has been pressed, interrupt or polling. We will do the polling here using previous code and add a simple polling loop to observe the value of P1.1. Note that before the BIT1 can be observed, we need to turn on the "intenal pull up resister" on BIT1, otherwise, there is no voltage supplied to the key button. If you are not famillar with the BITWISE operation (AND, OR, XOR, NOT), check this page

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

Students also viewed these Databases questions

Question

e. What are notable achievements of the group?

Answered: 1 week ago