回答編集履歴
2
追記
test
CHANGED
@@ -191,3 +191,31 @@
|
|
191
191
|
|
192
192
|
|
193
193
|
あと、ピンに関して、https://pinout.xyz/ というサイトも役立つと思います。
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
----
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
追記: OS情報取得
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
pi@raspberrypi:~ $ lsb_release -a
|
208
|
+
|
209
|
+
No LSB modules are available.
|
210
|
+
|
211
|
+
Distributor ID: Raspbian
|
212
|
+
|
213
|
+
Description: Raspbian GNU/Linux 9.8 (stretch)
|
214
|
+
|
215
|
+
Release: 9.8
|
216
|
+
|
217
|
+
Codename: stretch
|
218
|
+
|
219
|
+
pi@raspberrypi:~ $
|
220
|
+
|
221
|
+
```
|
1
gpioグループの記述
test
CHANGED
@@ -13,6 +13,12 @@
|
|
13
13
|
- 実行例
|
14
14
|
|
15
15
|
```
|
16
|
+
|
17
|
+
pi@raspberrypi:~ $ groups # ユーザ`pi`が`gpio`グループに所属しているので、sudoなしでアクセス可能
|
18
|
+
|
19
|
+
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
|
20
|
+
|
21
|
+
|
16
22
|
|
17
23
|
pi@raspberrypi:~ $ ls -l /sys/class/gpio/
|
18
24
|
|
@@ -98,7 +104,7 @@
|
|
98
104
|
|
99
105
|
|
100
106
|
|
101
|
-
|
107
|
+
----
|
102
108
|
|
103
109
|
あと、別の方法として、`gpio` というコマンドがあり、いろいろ操作できます。
|
104
110
|
|