#!/usr/bin/env bash ARDUINO_VERSION=1.8.5 #ARDUINO_VERSION=nightly #ARDUINO_HOME=~/ ARDUINO_HOME=/opt ARDUINO_DIR=${ARDUINO_HOME}/arduino-${ARDUINO_VERSION}/ ARDUINO_TOOLS_DIR=${ARDUINO_TOOLS_DIR} ADD_URLS= mkdir "${ARDUINO_TOOLS_DIR}" sudo apt-get install gcc-arm-none-eabi openocd bsdtar cd /var/tmp || exit #Install arduino IDE wget -c https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz && \ cd ${ARDUINO_HOME} && \ tar xf /var/tmp/arduino-${ARDUINO_VERSION}-linux64.tar.xz usermod -a -G dialout "${USER}" && \ apt-get install git python-serial #https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json #http://arduino.esp8266.com/stable/package_esp8266com_index.json #https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json #https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json #https://micooke.github.io/package_nRF5_smartwatches_index.json # https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls # Install ESP32 core ADD_URLS="${ADD_URLS},https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json" ${ARDUINO_DIR}/arduino \ --pref boardsmanager.additional.urls=${ADD_URLS} \ --save-prefs # arduino [--install-boards package name:platform architecture[:version]] ${ARDUINO_DIR}/arduino --install-boards esp32:esp32 mkdir -p ${ARDUINO_DIR}/hardware/espressif && \ cd ${ARDUINO_DIR}/hardware/espressif && \ git clone https://github.com/espressif/arduino-esp32.git esp32 && \ cd esp32 && \ git submodule update --init --recursive && \ cd esp32/tools/ && \ python get.py # Install ESP8266 cd /var/tmp || exit ADD_URLS="${ADD_URLS},http://arduino.esp8266.com/stable/package_esp8266com_index.json" echo ${ADD_URLS} ${ARDUINO_DIR}/arduino \ --pref boardsmanager.additional.urls=${ADD_URLS} \ --save-prefs # arduino [--install-boards package name:platform architecture[:version]] ${ARDUINO_DIR}/arduino --install-boards esp8266:esp8266 # Install stm32 bluepill # http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/arduino-compatibility.html # --pref boardsmanager.additional.urls="http://dan.drown.org/stm32duino/package_STM32duino_index.json" \ #${ARDUINO_DIR}/arduino --install-boards stm32duino:STM32F1 ADD_URLS="${ADD_URLS},https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json" echo ${ADD_URLS} ${ARDUINO_DIR}/arduino \ --pref boardsmanager.additional.urls=${ADD_URLS} \ --save-prefs ## arduino [--install-boards package name:platform architecture[:version]] ${ARDUINO_DIR}/arduino --install-boards STM32:stm32 # Install NRF5x sandeepmistry https://github.com/sandeepmistry/arduino-nRF5 #name "BBC micro:bit" #name "Bluz DK" #name "Generic nRF51822" #name "Generic nRF52823" #name "OSHChip" #name "ng-beacon" #name "nRF51 Dongle" #name "nRF51822 Development Kit" #name "nRF52 DK" #name "RedBear BLE Nano 2" #name "RedBear Blend 2" #name "RedBearLab BLE Nano" #name "RedBearLab nRF51822" #name "Waveshare BLE400" ADD_URLS="${ADD_URLS},https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json" echo ${ADD_URLS} ${ARDUINO_DIR}/arduino \ --pref boardsmanager.additional.urls=${ADD_URLS} \ --save-prefs # arduino [--install-boards package name:platform architecture[:version]] ${ARDUINO_DIR}/arduino --install-boards sandeepmistry:nRF5 NRF_HOME=${ARDUINO_TOOLS_DIR}/nRF5FlashSoftDevice/tool/ mkdir -p "${NRF_HOME}" && wget -c --directory-prefix "${NRF_HOME}" https://github.com/sandeepmistry/arduino-nRF5/releases/download/tools/nRF5FlashSoftDevice.jar # nRF5 watches https://github.com/micooke/arduino-nRF5-smartwatches # Smartwatch variants for sandeepmistry's Nordic Semiconductor nRF5 core #name "IDO003" #name "ID100HR" #name "ID107HR" #name "ID107HR Plus" ADD_URLS="${ADD_URLS},https://micooke.github.io/package_nRF5_smartwatches_index.json" ${ARDUINO_DIR}/arduino \ --pref boardsmanager.additional.urls=${ADD_URLS} \ --save-prefs ## arduino [--install-boards package name:platform architecture[:version]] ${ARDUINO_DIR}/arduino --install-boards micooke:nRF5 ## Install Readbear NRF5x #cd /var/tmp || exit #${ARDUINO_DIR}/arduino \ # --pref="boardsmanager.additional.urls=https://redbearlab.github.io/arduino/package_redbearlab_index.json"\ # --save-prefs # #wget -c https://raw.githubusercontent.com/RedBearLab/nRF51822-Arduino/S130/98-daplink.rules #cp 98-daplink.rules /etc/udev/rules.d/ # #sudo udevadm control --reload-rules # ## Fix the upload problem on Linux 64bit system # #sudo apt-get install lsb-core # #sudo apt-get install libudev1:i386 # #sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0 # Guru meditation decode - get a more meaningful explanation of the stack traces you get on ESP8266/ESP32. wget -qO - https://github.com/me-no-dev/EspExceptionDecoder/releases/download/1.1.0/EspExceptionDecoder-1.1.0.zip | bsdtar -C "${ARDUINO_TOOLS_DIR}" -xvf- # Other libraries direct from github git clone https://github.com/adafruit/Touch-Screen-Library ~/Arduino/libraries/TouchScreen # https://learn.adafruit.com/ahrs-for-adafruits-9-dof-10-dof-breakout/sensor-fusion-algorithmsahrs git clone https://github.com/PaulStoffregen/MahonyAHRS ~/Arduino/libraries/MahonyAHRS git clone https://github.com/PaulStoffregen/MadgwickAHRS ~/Arduino/libraries/MadgwickAHRS