0 0
Read Time:43 Second
  1. 運用用のRaspberryPIを準備
    http://u-style.info/2020/04/09/raspberrypi-zero%e5%88%b0%e7%9d%80%e3%80%80%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97%e3%80%80%e5%82%99%e5%bf%98%e9%8c%b2/
  2. 作成したプログラムのコピー
  3. プログラムを起動時に実行する為の方法http://CUI環境構築参照
    1. 作成したプログラムを起動時に動くようにする
      /etc/rc.localに動かしたいプログラムを記載

      例:

      #!/bin/sh -e
      #
      # rc.local
      #
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will “exit 0” on success or any other
      # value on error.
      #
      # In order to enable or disable this script just change the execution
      # bits.
      #
      # By default this script does nothing.

      # Print the IP address
      _IP=$(hostname -I) || true
      if [ “$_IP” ]; then
      printf “My IP address is %s\n” “$_IP”
      fi

      python3 /home/pi/public/prg/ras-pi-P75-led2-1.py  <<これを追記

      exit 0

       

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %