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

Skip to content

yangpeng-coder/demo_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sendIPの使い方

ファイルを実行

python3 /home/pi/demo_python/sendIP.py


raspberrypi起動時にファイルが自動実行

/etc/rc.localにプログラムファイルの実行を追記

#!/bin/sh -e
...

# Line Notify
su pi -c "/home/pi/demo_python/sendIP.py" &

exit 0
  • su piとは、ユーザーpiでコマンドを実行する。
  • -cとは、コマンドを実行した後に、元のユーザーに戻ります。

raspberry pi3のconfigを設定する

  1. sudo raspi-configコマンドでconfigを開く。
  2. System Options > Network at Bootを選択する。
  3. sudo rebootで再起動する。

About

learn python

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages