Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
battle_c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BeomSooHeo
battle_c
Commits
c03a13ea
Commit
c03a13ea
authored
4 years ago
by
BeomSooHeo
Browse files
Options
Downloads
Patches
Plain Diff
Update 2020_08_10.md
parent
1f517c94
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
GPIO_control/2020_08_10.md
+15
-1
15 additions, 1 deletion
GPIO_control/2020_08_10.md
with
15 additions
and
1 deletion
GPIO_control/2020_08_10.md
+
15
−
1
View file @
c03a13ea
...
...
@@ -17,14 +17,28 @@

<br><br>
먼저 사용하고자 하는 PIN번호에 대해서 mode설정을 해주어야 한다.
<br>
$ gpio mode 29 out //LED 연결wirngPi-Pin인 Pin-29의동작모드를 Output 모드로설정
<br>
gpio write [PIN_No.] [1 or 0] 를 통해서 PIN에 대해 ON/OFF 제어가 가능하고,
<br><br>
gpio read [PIN_No.] 를 통해 해당 PIN의 상태를 읽어올 수 있다.
<br><br>
**
주의해야할 점은, 우리가
<strong>
연결한 BCM번호에 대입된 wpi 번호를 입력
</strong>
해야 한다는 것이다.
<br><br>
가령 우리는 21번 PIN을 사용했기 때문에, 29라 입력해야 한다.
**
가령 우리는 21번 PIN을 사용했기 때문에, 29라 입력해야 한다.
**
<br><br>
물론, 리눅스BCM GPIO 핀번호를 이용한 제어가 가능하다.
<br>
다음과 같이 앞에 -g를 붙여주고, BCM-pin 번호를 그대로 쓰면된다.
<br>
$ gpio –g mode 21 out //LED 연결BCM-Pin인Pin21의동작모드를 Output 모드로설정
<br>
$ gpio –g write 21 1 //LED On
<br>
<strong>
**만약 mode에 대한 설정을 하지 않으면 제대로 작동하지 않을 수 있기 때문에 반드시 mode에 대한 설정이 선행되어야 한다.**
</strong>
</p>
...
...
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