Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
systemprogramming-4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eunchae Lee
systemprogramming-4
Commits
2fc1fd3d
Commit
2fc1fd3d
authored
1 year ago
by
Eunchae Lee
Browse files
Options
Downloads
Patches
Plain Diff
Update DHT11.c
parent
15b194f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/DHT11.c
+6
-6
6 additions, 6 deletions
src/DHT11.c
with
6 additions
and
6 deletions
src/DHT11.c
+
6
−
6
View file @
2fc1fd3d
...
...
@@ -86,7 +86,7 @@ void *server_thread(void *arg)
// 성공 시 연결 성공 메세지 출력
printf
(
"Connected to server
\n
"
);
// 서버로
부터
20초 간격으로 send
// 서버로 20초 간격으로
측정 데이터 평균
send
while
(
1
)
{
send_average
(
sock
);
...
...
@@ -121,22 +121,22 @@ void read_data()
for
(
int
i
=
0
;
i
<
MAX_TIME
;
i
++
)
{
count
=
0
;
//
count the duration of each state
//
각 상태에 대한 count 세기
while
(
digitalRead
(
PIN
)
==
state
)
{
count
++
;
delayMicroseconds
(
1
);
//
to avoid infinite loop
//
무한루프 탈출
if
(
count
==
255
)
{
break
;
}
}
//
store the current state
//
pin의 현재 상태 저장
state
=
digitalRead
(
PIN
);
//
to avoid infinite loop
//
무한루프 탈출
if
(
count
==
255
)
{
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment