Tags:
tag this topic
create new tag
view all tags
---+ A small project In 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. 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: * blue * cyan * green * yellow * magenta * red * white The top LED (lowest signal level) will therefore have the color blue, while the middle LED (highest signal level) will become white. Light the LED with the color corresponding to the signal level. Here is the exercise description: [[ExerciseSheets#SmallProject]] -- %USERSIG{UliRaich - 2022-10-17}% ---++ Comments %COMMENT%
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r4 - 2024-03-09
-
TWikiGuest
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
AFNOG Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback