Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
A small project |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
A small project | ||||||||
Line: 22 to 22 | ||||||||
Light the LED with the color corresponding to the signal level. | ||||||||
Added: | ||||||||
> > | Here is the exercise description: ExerciseSheets#SmallProject | |||||||
-- Uli Raich - 2022-10-17
Comments |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
A small projectIn this small project, we want to read the analogue sensor (slider) and display the result on the rgb LED ring. To do this, we will divide the possible slider values into 7 slices and light an LED depending on the slice into which the value falls. Since we can get values between 0 and 4096 the first slice will be 0 .. 585 (4096 / 7). If we do this, the highest slice will be 3510 .. 4095. | ||||||||
Added: | ||||||||
> > | First, print the led number for the signal level read from the slider. Move the slider and make sure that you get the correct LED number.
Then light the LED you found with a single color, e,g, red.
Signal levels are often represented in colors, where "cold" colors represent low values and "hot" colors represent high values.
We can then attribute a different color to each LED, as the lighting of the LED depends on the signal level reached. We only use the basic colors:
| |||||||
-- Uli Raich - 2022-10-17
Comments |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
A small projectIn this small project, we want to read the analogue sensor (slider) and display the result on the rgb LED ring. To do this, we will divide the possible slider values into 7 slices and light an LED depending on the slice into which the value falls. Since we can get values between 0 and 4096 the first slice will be 0 .. 585 (4096 / 7). If we do this, the highest slice will be 3510 .. 4095. -- Uli Raich - 2022-10-17Comments |