Question: Part A: You are to write C code for the CC3200 to do the following: .Start with an integer, we call time on. Its value

Part A: You are to write C code for the CC3200 to do the following: .Start with an integer, we call time on. Its value can range from 0-10. Its initial value will be 0. Every time you push the PUSH2 switch, increment time_on. Similarly, when you push PUSH1, decrement time_on. Every 10 milliseconds, turn on RED LED for Time_on milliseconds. It will then be off for the remainder of that period. . Write a subroutine (function) to do the following: o Inputs: (int pin_num, int time_on) o Outputs: (void) o Subroutine will supply digitalWrite HIGH to pin_num, delay for time_on, digitalWrite LOW to pin_num, then delay for 10-time_on. o Subroutine will then return to calling program Once you get your program running, take a short (cell phone) video that demonstrates what the LED does Upload the videdo Include your code in your submission. Hint: If you are unsure on how to write a subroutine in C, Google it. Here is an example I found quite easily: https://en.wikibooks.org/wiki/C_Programming/Procedures_and_functions Part B: Softball throw out play Assume a softball player can throw a softball at 100ft/sec. Our objective is to calculate the optimal angle to throw the ball to get the runner out from 260 ft.assuming no aerodynamic friction and then assuming aerodynamic friction. We'll get there, but first, we need to setup the problem for some arbitraryangle, say 30 degrees. Hints: Setup the parameters you know and create alias as desired You should end up with something like this: Part A: You are to write C code for the CC3200 to do the following: .Start with an integer, we call time on. Its value can range from 0-10. Its initial value will be 0. Every time you push the PUSH2 switch, increment time_on. Similarly, when you push PUSH1, decrement time_on. Every 10 milliseconds, turn on RED LED for Time_on milliseconds. It will then be off for the remainder of that period. . Write a subroutine (function) to do the following: o Inputs: (int pin_num, int time_on) o Outputs: (void) o Subroutine will supply digitalWrite HIGH to pin_num, delay for time_on, digitalWrite LOW to pin_num, then delay for 10-time_on. o Subroutine will then return to calling program Once you get your program running, take a short (cell phone) video that demonstrates what the LED does Upload the videdo Include your code in your submission. Hint: If you are unsure on how to write a subroutine in C, Google it. Here is an example I found quite easily: https://en.wikibooks.org/wiki/C_Programming/Procedures_and_functions Part B: Softball throw out play Assume a softball player can throw a softball at 100ft/sec. Our objective is to calculate the optimal angle to throw the ball to get the runner out from 260 ft.assuming no aerodynamic friction and then assuming aerodynamic friction. We'll get there, but first, we need to setup the problem for some arbitraryangle, say 30 degrees. Hints: Setup the parameters you know and create alias as desired You should end up with something like this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
