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
|
# Benodigde pakketten installeren
|
||||||
echo -e "${green}Afhankelijkheden installeren...${reset}"
|
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
|
# I2C inschakelen
|
||||||
echo -e "${green}I2C inschakelen...${reset}"
|
echo -e "${green}I2C inschakelen...${reset}"
|
||||||
|
|
@ -51,22 +51,21 @@ cd /opt/grovepi/Script
|
||||||
sudo bash install.sh
|
sudo bash install.sh
|
||||||
|
|
||||||
# Installeren i2c-tools
|
# Installeren i2c-tools
|
||||||
cd /opt/grovepi/Script/i2c-tools-3.1.0
|
cd /opt
|
||||||
sudo make
|
sudo git clone https://github.com/DexterInd/RFR_Tools.git
|
||||||
sudo make install
|
cd RFR_Tools/miscllaneous
|
||||||
|
sudo apt install python3-periphery
|
||||||
# Installeren i2c-tools python
|
sudo pip3 install smbus-cffi
|
||||||
cd /opt/grovepi/Script/i2c-tools-3.1.0/py-smbus
|
|
||||||
sudo python3 setup.py build
|
sudo python3 setup.py build
|
||||||
sudo python3 setup.py install
|
sudo python3 setup.py install
|
||||||
|
|
||||||
# Installeren en aanpassen van WiringPi
|
# Installeren en aanpassen van WiringPi
|
||||||
sudo rm -rf /opt/WiringPi
|
sudo rm -rf /opt/WiringPi
|
||||||
cd /opt
|
cd /opt
|
||||||
git clone https://github.com/WiringPi/WiringPi
|
sudo git clone https://github.com/WiringPi/WiringPi
|
||||||
cd WiringPi
|
cd WiringPi
|
||||||
sudo rm wiringPi/wiringPiLegacy.c
|
sudo rm wiringPi/wiringPiLegacy.c
|
||||||
cat > wiringPi/wiringPiLegacy.c <<EOL
|
cat > /home/pi/wiringPiLegacy.c <<EOL
|
||||||
#include <wiringPi.h>
|
#include <wiringPi.h>
|
||||||
#include "wiringPiLegacy.h"
|
#include "wiringPiLegacy.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -111,14 +110,16 @@ int piGpioLayoutLegacy(void) {
|
||||||
return gpioLayout;
|
return gpioLayout;
|
||||||
}
|
}
|
||||||
EOL
|
EOL
|
||||||
|
sudo cp /home/pi/wiringPiLegacy.c /opt/WiringPi/wiringPi/
|
||||||
|
sudo ./build
|
||||||
|
|
||||||
# Installeren van WiringPi python
|
# Installeren van WiringPi python
|
||||||
sudo rm -rf /opt/WiringPi-Python
|
sudo rm -rf /opt/WiringPi-Python
|
||||||
cd /opt
|
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
|
cd WiringPi-Python
|
||||||
sudo rm -rf WiringPi
|
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 build
|
||||||
sudo python3 setup.py install
|
sudo python3 setup.py install
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue