Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
JSH_Project3
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
기상윤
2021-06-14 17:20:07 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9bbfe0ca50406e6fc3d3afeee2aed1f172aa2d38
9bbfe0ca
1 parent
d3bf038a
Delete PADMOTOR.ino
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
code/PADMOTOR.ino
code/PADMOTOR.ino
deleted
100644 → 0
View file @
d3bf038
int
Mosfet1
=
7
;
// 펠티어 연결 모스펫 7번포트
int
Mosfet2
=
6
;
// 모터 연결 모스펫 6번포트
char
data
;
// 데이터 입력 종류
void
setup
()
{
Serial
.
begin
(
9600
);
pinMode
(
Mosfet1
,
OUTPUT
);
pinMode
(
Mosfet2
,
OUTPUT
);
}
void
loop
()
{
if
(
Serial
.
available
()
>
0
)
// 입력된 데이터가 있다면
{
data
=
Serial
.
read
();
// 데이터에 입력값 넣기
}
if
(
data
==
'f'
)
// f를 입력했을 경우 펠티어 모스펫 on
{
digitalWrite
(
Mosfet1
,
HIGH
);
}
else
if
(
data
==
'd'
)
// d를 입력했을 경우 펠티어 모스펫 off
{
digitalWrite
(
Mosfet1
,
LOW
);
}
else
if
(
data
==
's'
)
// s를 입력했을 경우 모터 on
{
digitalWrite
(
Mosfet2
,
HIGH
);
}
else
if
(
data
==
'a'
)
// a를 입력했을 경우 모터 off
{
digitalWrite
(
Mosfet2
,
LOW
);
}
}
Please
register
or
login
to post a comment