Update installer.sh
This commit is contained in:
parent
b374818662
commit
b611622c30
1 changed files with 12 additions and 11 deletions
23
installer.sh
23
installer.sh
|
|
@ -16,7 +16,7 @@ sudo apt update && sudo apt upgrade -y
|
|||
|
||||
# Benodigde pakketten installeren
|
||||
echo -e "${green}Afhankelijkheden installeren...${reset}"
|
||||
sudo apt install -y git python3 python3-pip python3-smbus i2c-tools raspi-config
|
||||
sudo apt install -y git python3 python3-pip python3-smbus i2c-tools swig raspi-config
|
||||
|
||||
# I2C inschakelen
|
||||
echo -e "${green}I2C inschakelen...${reset}"
|
||||
|
|
@ -51,22 +51,21 @@ cd /opt/grovepi/Script
|
|||
sudo bash install.sh
|
||||
|
||||
# Installeren i2c-tools
|
||||
cd /opt/grovepi/Script/i2c-tools-3.1.0
|
||||
sudo make
|
||||
sudo make install
|
||||
|
||||
# Installeren i2c-tools python
|
||||
cd /opt/grovepi/Script/i2c-tools-3.1.0/py-smbus
|
||||
cd /opt
|
||||
sudo git clone https://github.com/DexterInd/RFR_Tools.git
|
||||
cd RFR_Tools/miscllaneous
|
||||
sudo apt install python3-periphery
|
||||
sudo pip3 install smbus-cffi
|
||||
sudo python3 setup.py build
|
||||
sudo python3 setup.py install
|
||||
|
||||
# Installeren en aanpassen van WiringPi
|
||||
sudo rm -rf /opt/WiringPi
|
||||
cd /opt
|
||||
git clone https://github.com/WiringPi/WiringPi
|
||||
sudo git clone https://github.com/WiringPi/WiringPi
|
||||
cd WiringPi
|
||||
sudo rm wiringPi/wiringPiLegacy.c
|
||||
cat > wiringPi/wiringPiLegacy.c <<EOL
|
||||
cat > /home/pi/wiringPiLegacy.c <<EOL
|
||||
#include <wiringPi.h>
|
||||
#include "wiringPiLegacy.h"
|
||||
#include <stdio.h>
|
||||
|
|
@ -111,14 +110,16 @@ int piGpioLayoutLegacy(void) {
|
|||
return gpioLayout;
|
||||
}
|
||||
EOL
|
||||
sudo cp /home/pi/wiringPiLegacy.c /opt/WiringPi/wiringPi/
|
||||
sudo ./build
|
||||
|
||||
# Installeren van WiringPi python
|
||||
sudo rm -rf /opt/WiringPi-Python
|
||||
cd /opt
|
||||
git clone git clone --recursive https://github.com/WiringPi/WiringPi-Python.git
|
||||
sudo git clone --recursive https://github.com/WiringPi/WiringPi-Python.git
|
||||
cd WiringPi-Python
|
||||
sudo rm -rf WiringPi
|
||||
sudo cp -r /home/pi/WiringPi /home/pi/WiringPi-Python/
|
||||
sudo cp -r /opt/WiringPi /opt/WiringPi-Python/
|
||||
sudo python3 setup.py build
|
||||
sudo python3 setup.py install
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue