Tiva C Series TM4C123G
Around the Color Wheel - 30pts Create a function that returns the intensity for an individual LED based on the phase of the color wheel. Use this function to set the intensity of the LEDs based off the position of the potentiometer. The function prototype should be: uint8_t intensity (uint16_t theta); This will require you to scale the value of the potentiometer to match the range of color wheel. The number passed to the intensity function will have to be offset for each color to match the phase difference of the color wheel. Display Level - 10pts Create a function that uses the 4 digit display to show the intensity for an individual LED. The first digit should indicate the LED using 1, 2, or 3. The other 3 digits should display the intensity. The function prototype should be: void displayLevel(uint8_t digit, uint8_t value); Modify your program so that when push button 2 is released, the program cycles to showing the value of the next LED. RGB Color Wheel #FF0000 RGB(255,0,0) #FF7F00 RGB(255, 127,0) #FF007F RGB(255,0.127) Red Red Magenta Orange #FF00FF RGB(255,0.255) #FFFF00 RGB(255,255,0) Magenta Yellow #7FOOFF RGB(127,0,255) Blue Magenta Green Yellow #7FFF00 RGB(127,255,0) Green #0000FF RGB(0,0,255) #00FF00 RGB(0,255,0) Blue Cyan Green Cyan Cyan #007FFF RGB(0,127, 255) #00FF7F RGB(0,255,127) #00FFFF RGB(0.255.255) Around the Color Wheel - 30pts Create a function that returns the intensity for an individual LED based on the phase of the color wheel. Use this function to set the intensity of the LEDs based off the position of the potentiometer. The function prototype should be: uint8_t intensity (uint16_t theta); This will require you to scale the value of the potentiometer to match the range of color wheel. The number passed to the intensity function will have to be offset for each color to match the phase difference of the color wheel. Display Level - 10pts Create a function that uses the 4 digit display to show the intensity for an individual LED. The first digit should indicate the LED using 1, 2, or 3. The other 3 digits should display the intensity. The function prototype should be: void displayLevel(uint8_t digit, uint8_t value); Modify your program so that when push button 2 is released, the program cycles to showing the value of the next LED. RGB Color Wheel #FF0000 RGB(255,0,0) #FF7F00 RGB(255, 127,0) #FF007F RGB(255,0.127) Red Red Magenta Orange #FF00FF RGB(255,0.255) #FFFF00 RGB(255,255,0) Magenta Yellow #7FOOFF RGB(127,0,255) Blue Magenta Green Yellow #7FFF00 RGB(127,255,0) Green #0000FF RGB(0,0,255) #00FF00 RGB(0,255,0) Blue Cyan Green Cyan Cyan #007FFF RGB(0,127, 255) #00FF7F RGB(0,255,127) #00FFFF RGB(0.255.255)