Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d38b45

Browse files
add ReadMe
1 parent 0f854d8 commit 1d38b45

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ReadMe.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# sendIPの使い方
2+
## ファイルを実行
3+
`python3 /home/pi/demo_python/sendIP.py`
4+
***
5+
## raspberrypi起動時にファイルが自動実行
6+
### /etc/rc.localにプログラムファイルの実行を追記
7+
```
8+
#!/bin/sh -e
9+
...
10+
11+
# Line Notify
12+
su pi -c "/home/pi/demo_python/sendIP.py" &
13+
14+
exit 0
15+
```
16+
* `su pi`とは、ユーザーpiでコマンドを実行する。
17+
* `-c`とは、コマンドを実行した後に、元のユーザーに戻ります。
18+
## raspberry pi3のconfigを設定する
19+
1. `sudo raspi-config`コマンドでconfigを開く。
20+
2. `System Options > Network at Boot`を選択する。
21+
3. `sudo reboot`で再起動する。

0 commit comments

Comments
 (0)