LoginSignup
4
2

More than 5 years have passed since last update.

GrovePi+のinstall.shでCommand not foundが出たときの対処法

Last updated at Posted at 2019-01-16

GrovePi+を使用するためにinstall.shを実行していたら,コマンドfeedbackに対して,Command not foundが出たのでその対処法に関する備忘録.

環境

  • Raspberry Pi3 Model B
    • Raspberry Pi3 コンプリートスターターキット (Standard 16G)を使用.
    • OSはmicroSDにプリインストールされたRaspian Streach with Desktopを使用.
  • Raspberry Pi センサーキット GrovePi+

手順

https://liginc.co.jp/309311 を参考に設定.

必要なファイルのダウンロード

Githubからファイルをダウンロード.

$  git clone https://github.com/DexterInd/GrovePi

実行ファイルのインストール

以下のコマンドを実行.

$ cd GrovePi/Script/
$ chmod +x install.sh
$ sudo ./install.sh

あとは「y」をひたすら押すと,インストールが完了するらしいが,筆者の環境では以下のエラーが出た.

./install.sh: 行 11: /home/pi/Dexter/lib/Dexter/script_tools/functions_library.sh: そのようなファイルやディレクトリはありません
Special thanks to Joe Sanford at Tufts University. This script was derived from his work. Thank you Joe!
./install.sh: 行 38: feedback: コマンドが見つかりません

なお,このエラーを無視しても,Raspberry PiはGrovePiを検出できるようで,

$  i2cdetect -y 1

を実行しても正しく検出される.
ところが予め用意されているサンプルプログラムのうち,LED1個をチカチカさせるプログラムしか実行できない.
そこで,実行ファイルのインストールをやり直す.

インストールの再実行

https://github.com/initialstate/grovepi/wiki/Part-2.-GrovePi-Setup の通り実行する.

$  sudo curl -kL dexterindustries.com/update_grovepi | bash
$  sudo pip install grovepi
$  sudo reboot

この手順を実行すると,インストールが成功し,すべてのサンプルプログラムが実行できた.
参考サイトによると,

The step, $ sudo pip install grovepi , allows us to import the grovepi Python library from any directory on our Pi. If you skip this step, you will have to create all of your GrovePi projects within the /home/pi/Desktop/GrovePi/Software/Python directory (which is icky).

とある.どうやら,$ sudo pip install grovepiを実行しないと,任意のディレクトリからの,GrovePiの利用ができないらしい.

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2