Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tiva C Series TM4C123G Around the Color Wheel - 30pts Create a function that returns the intensity for an individual LED based on the phase

Tiva C Series TM4C123G image text in transcribed
image text in transcribed
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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions