Sensor Package for Drones & Rockets
Go to file
2024-10-27 11:30:34 -04:00
src Organized 2024-10-27 08:25:06 -04:00
ui Organized 2024-10-27 08:25:06 -04:00
.gitignore init 2024-10-27 08:20:28 -04:00
package-lock.json init 2024-10-27 08:20:28 -04:00
package.json Organized 2024-10-27 08:25:06 -04:00
README.md Add README.md 2024-10-27 11:30:34 -04:00

Apollo

Setup

sudo apt update && sudo apt upgrade -y
sudo apt install htop i2c-tools
raspi-config # enable i2c

MAC fix

MAC_PREFIX="80:86:00"

files=(
    "/etc/systemd/network/eth0.network"
    "/etc/systemd/network/wlan0.network"
)

for file in "${files[@]}"; do
    if [ -n "$(cat $file | grep MACAddress )" ]; then continue; fi
    mac_address=$(printf '%02X:%02X:%02X' $((RANDOM % 256)) $((RANDOM % 256)) $((RANDOM % 256)))
    cat <<EOF >> "$file"
[Link]
MACAddress=$MAC_PREFIX:$mac_address
EOF
done