-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-build-env.sh
39 lines (33 loc) · 1.35 KB
/
setup-build-env.sh
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
#!/bin/bash
apt update
cd ~
# Install arduino-cli
apt install curl -y
curl -L -o arduino-cli.tar.bz2 https://downloads.arduino.cc/arduino-cli/arduino-cli-latest-linux64.tar.bz2
tar xjf arduino-cli.tar.bz2
rm arduino-cli.tar.bz2
mv `ls -1` /usr/bin/arduino-cli
# Install python, pip and pyserial
apt install python -y
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install pyserial
# Install esp32 core
printf "board_manager:\n additional_urls:\n - https://dl.espressif.com/dl/package_esp32_index.json\n" > .arduino-cli.yaml
arduino-cli core update-index --config-file .arduino-cli.yaml
arduino-cli core install esp32:esp32 --config-file .arduino-cli.yaml
# Install 'native' packages
arduino-cli lib install "Adafruit BME280 Library"
arduino-cli lib install "Adafruit Unified Sensor"
arduino-cli lib install "HCSR04 ultrasonic sensor"
arduino-cli lib install "ArduinoJson"
arduino-cli lib install "MPU9250_asukiaaa"
cd -
# Install 'third-party' packages: find proper location and 'git clone'
apt install git -y
cd `arduino-cli config dump | grep sketchbook | sed 's/.*\ //'`/libraries
git clone https://github.com/me-no-dev/AsyncTCP.git
git clone https://github.com/me-no-dev/ESPAsyncWebServer.git
git clone https://github.com/ThingPulse/esp8266-oled-ssd1306.git
git clone https://github.com/RoboticsBrno/ESP32-Arduino-Servo-Library.git
cd -