diff --git a/installer.sh b/installer.sh index 84bd1c3..111156f 100644 --- a/installer.sh +++ b/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 < /home/pi/wiringPiLegacy.c < #include "wiringPiLegacy.h" #include @@ -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