Tags:
tag this topic
create new tag
view all tags
---+ Exercises on dust sensors ---++ Exercise 1: The Plantower sensor The Plantower sensor comes with a flat cable with alternating red and black color. I soldered a female Dupont cable to its end. The colors in the table below correspond to the colors of my Dupont cable. Pin 1 is on the right-hand side of the connector on the sensor. <img alt="plantowerConnector.png" src="%ATTACHURL%/plantowerConnector.png" title="plantowerConnector.png" /> Connections: | *PlanTower Pin* | *!WeMos bus* | *color of Dupont cable* | | 1: Vcc | 5V | green | | 2: GND | GND | blue | | 3: set | nc | violet | | 4: Rx | D2: GPIO 22 | gray | | 5: Tx | D1_ GPIO 21 | white | | 6: RESET | RST | black | | 7: nc | | | Connect the Plantower sensor to the ESP32 according to the table above. Create a serial connection on !UART 2 with rx on pin 22 and tx on pin 21. Read messages from the Plantower sensor and print them. ---++ Exercise 2: Write a function decoding the message. * Make sure to find the start characters. * Get the frame length and print it. * Calculate the checksum and print it together with the checksum in the message. Compare them and make sure they are equal * Print the measurement results -- %USERSIG{UliRaich - 2022-09-09}% ---++ Comments %COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
plantowerConnector.png
r1
manage
1330.7 K
2022-09-10 - 14:35
UliRaich
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2022-09-10
-
UliRaich
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
IoT_Course_English Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
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