Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이다은
/
raspberry
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
daeun
2021-04-23 15:10:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3bcf322fc2e44774433b1b25dfc0210df1f59809
3bcf322f
1 parent
08d2c289
a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
midterm4.c
midterm4.c
View file @
3bcf322
...
...
@@ -93,28 +93,30 @@ int main(){
if
(
wiringPiISR
(
Keypad
[
2
],
INT_EDGE_FALLING
,
&
reset
)
<
0
)
{
return
1
;
}
if
(
state
==
0
)
{
unsigned
long
prevtime
=
millis
();
while
(
1
)
{
if
(
state
>
0
)
break
;
unsigned
long
curtime
=
millis
();
if
(
curtime
-
prevtime
>=
9
)
{
prevtime
=
curtime
;
time
++
;
while
(
1
)
{
if
(
state
==
0
)
{
unsigned
long
prevtime
=
millis
();
while
(
1
)
{
if
(
state
>
0
)
break
;
unsigned
long
curtime
=
millis
();
if
(
curtime
-
prevtime
>=
9
)
{
prevtime
=
curtime
;
time
++
;
}
data
[
0
]
=
time
%
10
;
data
[
1
]
=
(
time
%
100
)
/
10
;
data
[
2
]
=
(
time
%
1000
)
/
100
;
data
[
3
]
=
(
time
/
1000
)
%
10
;
data
[
4
]
=
(
time
/
10000
)
%
10
;
data
[
5
]
=
time
/
100000
;
timer
();
}
data
[
0
]
=
time
%
10
;
data
[
1
]
=
(
time
%
100
)
/
10
;
data
[
2
]
=
(
time
%
1000
)
/
100
;
data
[
3
]
=
(
time
/
1000
)
%
10
;
data
[
4
]
=
(
time
/
10000
)
%
10
;
data
[
5
]
=
time
/
100000
;
timer
();
}
}
else
{
while
(
1
)
{
if
(
state
==
0
)
break
;
timer
();
else
{
while
(
1
)
{
if
(
state
==
0
)
break
;
timer
()
;
}
}
}
return
0
;
...
...
Please
register
or
login
to post a comment