-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautorocket.sh
More file actions
executable file
·31 lines (23 loc) · 1.22 KB
/
autorocket.sh
File metadata and controls
executable file
·31 lines (23 loc) · 1.22 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
#!/bin/bash
# Note we assume sudo apt update && sudo apt upgrade has been run
# Autohotspot needs to be installed with the interactive installer
# install apt dependencies
sudo apt install python3 python3-pip git mosquitto mosquitto-clients pigpio python3-picamera python3-matplotlib -y -qq
# install python3 dependencies
sudo pip3 install paho-mqtt pigpio adafruit-circuitpython-bmp280 psutil adafruit-circuitpython-l3gd20 lsm303d
#git clone https://github.com/BadTigrou/Adafruit_CircuitPython_BMP180.git
#cd Adafruit_CircuitPython_BMP180
#sudo python3 setup.py install
# enable services on startup
sudo systemctl enable mosquitto
sudo systemctl enable pigpiod
# enable remote gpio and IC2
sudo raspi-config nonint do_rgpio 0
sudo raspi-config nonint do_i2c 0
# download flight software and install
sudo curl https://raw.githubusercontent.com/rendermaniac/wbrpi/main/flight_computer3.py -o /usr/bin/flight_computer3.py
# add flight_computer3.py to /etc/rc.local just before exit 0 command
sudo sed -i.bak -e '$ipython3 \/usr\/bin\/flight_computer3.py&' /etc/rc.local
# download autohotspot
curl "https://www.raspberryconnect.com/images/hsinstaller/AutoHotspot-Setup.tar.gz" -o AutoHotspot-Setup.tar.gz
tar -xzvf AutoHotspot-Setup.tar.gz