For the mspfr6989 write program #2
1(b) Write a program that will make LED1 blink 5 times when S1is pressed, and then stop.
Program #2 – Using both S1 and S2 1 Write aprogram like 1(b) above, but the LED1 will blink until S2 ispressed. 2 Write a program that simulates a motor coming up tospeed. When S1 is pressed, LED1 blinks at 50% duty cycle for 10cycles (indicating a motor coming up to speed). After that time,LED2 comes on (indicating the motor is at speed), and can be turnedoff by pressing S2. 3 Create a flexible program for 2(b) that willreverse the operation of the LEDs if S2 is pressed first (LED2shows ramp-up, and LED1 shows motor at full speed). Must usefunctions to control all timing, LED access, etc… Main programshould just have loops and function calls.