-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
62 lines (46 loc) · 1.32 KB
/
setup.sh
File metadata and controls
62 lines (46 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#Red Robotics RedBoard V1.2 set up script
#Neopixel set up taken from the original Adafruit tutorial:
#https://learn.adafruit.com/neopixels-on-raspberry-pi/software
#Uses the pigpio library: http://abyz.co.uk/rpi/pigpio/
cd
sudo apt-get install python3-dev python-dev python-pip python3-pip joystick -y
sudo pip3 install evdev
sudo pip install evdev
sudo apt-get install build-essential git scons swig -y
sudo rm -rf RedBoard
git clone https://github.com/RedRobotics/RedBoard.git
cd RedBoard
cp * /home/pi
cd
git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
scons
cd python
sudo python setup.py install
sudo python3 setup.py install
cd
if grep -Fq "pigpiod" "/etc/rc.local"
then
echo "Pigpio already installed"
else
echo "Installing shutdown script"
cd
rm pigpio.zip
sudo rm -rf PIGPIO
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make
sudo make install
cd
rm pigpio.zip
sudo sed -i -e '$i #start Pigpio deamon\nsudo pigpiod\n' /etc/rc.local
fi
if grep -Fq "reset_shutdown.py" "/etc/rc.local"
then
echo "Shutdown script already running"
else
echo "Installing shutdown script"
sudo sed -i -e '$i #start reset_shutdown script\nsudo python3 /home/pi/ip.py; sudo python3 /home/pi/reset_shutdown.py&' /etc/rc.local
fi
sudo reboot