Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 2 When the button is pressed, the red LEDs flash on and off at a frequency of 2Hz, i.e. two cycles per second or,

image text in transcribed

Task 2 When the button is pressed, the red LEDs flash on and off at a frequency of 2Hz, i.e. two cycles per second or, in other words, on for 0.25 seconds, off for 0.25 seconds ( 1 cycle per 0.5 seconds). Modify your project such that, when the button is pressed, the red LEDs flash on and off at a frequency of 1Hz, i.e. on for 0.5 seconds, off for 0.5 seconds. Copy and paste the changes made to your code into your report. Task 3 Modify your project such that pressing the button stops the LEDs flashing (all three LEDs should be flashing when the button is not pressed), i.e. - Button off: all three LEDs flashing. - Button on: all LEDs off. Copy and paste your code into your report. Task 4 Modify your project to include an extra push-button switch such that both buttons need to be pressed simultaneously to stop the LEDs flashing. i.e. - At least one button off: all three LEDs flashing. - Both buttons on: all LEDs off. Note that \&\& and are logical AND and OR in C++, respectively. Copy and paste your code into your report

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