まりぱらおーぐ

主にコンピューター周辺の話を中心に、気ままに書いていきます。

メモ: Raspberry Pi の Grove HAT 有効化


はじめに

以下の HAT を買ったので、有効化して使えるようにするためのメモ。

www.switch-science.com

設定

リンクをたどると以下にやりかたが書いてある。

wiki.seeedstudio.com

やってみる。

curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s
deb https://seeed-studio.github.io/pi_repo/ stretch main
Warning: apt-key output should not be parsed (stdout is not a terminal)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3822  100  3822    0     0  12939      0 --:--:-- --:--:-- --:--:-- 12955
OK
(中略)
Successfully installed RPi.GPIO-0.7.0 grove.py-0.6
#######################################################
  Lastest Grove.py from github install complete   !!!!!
#######################################################

ライブラリを突っ込む

git clone する。

$ git clone https://github.com/Seeed-Studio/grove.py
Cloning into 'grove.py'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 1249 (delta 26), reused 32 (delta 9), pack-reused 1190
Receiving objects: 100% (1249/1249), 644.01 KiB | 623.00 KiB/s, done.
Resolving deltas: 100% (807/807), done.
pi@raspberrypi:~ $ cd grove.py/
pi@raspberrypi:~/grove.py $ sudo pip install .
Processing /home/pi/grove.py
  Requirement already satisfied (use --upgrade to upgrade): grove.py==0.6 from file:///home/pi/grove.py in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: RPi.GPIO in /usr/local/lib/python2.7/dist-packages (from grove.py==0.6)
Requirement already satisfied: rpi_ws281x in /usr/local/lib/python2.7/dist-packages (from grove.py==0.6)
Requirement already satisfied: smbus2 in /usr/local/lib/python2.7/dist-packages (from grove.py==0.6)
pi@raspberrypi:~/grove.py $ sudo pip3 install .
Processing /home/pi/grove.py
  Requirement already satisfied (use --upgrade to upgrade): grove.py==0.6 from file:///home/pi/grove.py in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: RPi.GPIO in /usr/local/lib/python3.5/dist-packages (from grove.py==0.6)
Requirement already satisfied: rpi_ws281x in /usr/local/lib/python3.5/dist-packages (from grove.py==0.6)
Requirement already satisfied: smbus2 in /usr/local/lib/python3.5/dist-packages (from grove.py==0.6)```

Copyright © 2002-2015 まりぱらおーぐ All Rights Reserved.