Tags:
view all tags
---+ Combining the Real World with the Virtual World Before we have seen how to read out the color sensor and and how to determine the distance between the colored paper and the ultra-sonic distance sensor. We also saw how to create a virtual world with VPython. All that is left now is combing both parts. Here is a photo of the hardware setup <img alt="" height="477" src="%ATTACHURL%/fullSetup.png" width="715" /> In front you see the HC-SR04 ultra-sonic distance sensor (the one with the two cylinders sticking out) and the color sensor (the one with the black guard ring and the 4 LEDs). Behind the distance sensor you see an rgb LED on the left and a level converter on the right, converting the 5V TTL output signals from the distance and the color sensors to 3.3 V needed by the Raspberry Pi. Here are the connections: *The HC-SR04 distance sensor:* | Vcc | 5V | | | Trig | gpio 23 | | | Echo | gpio 24 | via the level converter | | Gnd | Gnd | | *The rgb LED* | + | 3.3V | | red | gpio 17 | | green | gpio 22 | | blue | gpio 18 | *The TCS34200 color sensor* | Gnd | Gnd | | | Out | gpio 19 | via the level converter | | S2 | gpio 13 | | | S4 | gpio 26 | | | Vcc | 5V | | | Gnd | nc | | | LED | gpio 21 | | | S0 | gpio 26 | | | S1 | gpio 12 | | | Vcc | nc | | -- %USERSIG{UliRaich - 2018-03-07}% ---++ Comments <br />%COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
fullSetup.png
r1
manage
1315.7 K
2018-03-07 - 10:34
UliRaich
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2018-03-07
-
UliRaich
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
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
Edit
Attach
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