Question: Modify the following code so that the blue, red, and green LED lights of D3 will turn on one at a time and cycle through
Modify the following code so that the blue, red, and green LED lights of D3 will turn on one at a time and cycle through endlessly.

I am using the MSP4302553. The schematic for the D3 RGB LED is below:

I get that the code will change to represent utilizing port 2 pins 5, 3, and 1.
So I believe it will start off like this:
P2DIR |= BIT5+BIT3+BIT1
and then follow the instructions to make it perform as required.
How do I get them to turn on and off individually in a cycle? Thanks!
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
