Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Energia and C Language create a function that controls the intensity for an individual LED based on the phase of the color wheel. Use
Using Energia and C Language create a function that controls the intensity for an individual LED based on the phase of the color wheel. Use this function to set the intensity of the LED's based on the position of the potentiometer. Tiva C microcontroller used with Grove Starter kit launchpad.
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. RGB Color Wheel #FF0000 RGB(255,0,0) #FF7F00 RGB(255, 127,0) Red #FF007F RGB(255,0.127) Red Magenta Orange #FF00FF RGB(255,0,255) #FFFF00 RGB(255,255,0) Magenta Yellow #7 FOOFF RGB(127,0,255) Blue Magenta Green Yellow #7FFF00 RGB(127,255,0) Blue Green #00FF00 RGB(0,255,0) #0000FF RGB(0,0,255) Blue Cyan Green Cyan Cyan #007FFF RGB(0,127,255) #00FF7F RGB(0,255,127) #00FFFF RGB(0,255,255) 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. RGB Color Wheel #FF0000 RGB(255,0,0) #FF7F00 RGB(255, 127,0) Red #FF007F RGB(255,0.127) Red Magenta Orange #FF00FF RGB(255,0,255) #FFFF00 RGB(255,255,0) Magenta Yellow #7 FOOFF RGB(127,0,255) Blue Magenta Green Yellow #7FFF00 RGB(127,255,0) Blue Green #00FF00 RGB(0,255,0) #0000FF RGB(0,0,255) Blue Cyan Green Cyan Cyan #007FFF RGB(0,127,255) #00FF7F RGB(0,255,127) #00FFFF RGB(0,255,255)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started