Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sensebox esp32s2 #105

Merged
merged 10 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM node:17

ENV ARDUINO_CLI_VERSION=0.29.0 \
ENV ARDUINO_CLI_VERSION=0.35.3 \
SENSEBOXCORE_VERSION=2.0.0 \
ARDUINO_SAMD_VERSION=1.8.13 \
ARDUINO_AVR_VERSION=1.8.5 \
ESP32_VERSION=2.0.9 \
SENSEBOXCORE_URL=https://raw.githubusercontent.com/mariopesch/senseBoxMCU-core/master/package_sensebox_index.json \
ESP32CORE_URL=https://mariopesch.github.io/sensebox-esp32-dev/package_esp32_index.json \
SSD1306_PLOT_LIBRARY_URL=https://github.com/sensebox/SSD1306-Plot-Library/archive/refs/tags/v1.0.0.zip \
SENSEBOX_LIBWEB_URL=https://github.com/sensebox/sensebox-libweb/archive/refs/heads/master.zip \
SDS011_LIBRARY_URL=https://github.com/sensebox/SDS011-select-serial/archive/refs/heads/master.zip \
Expand All @@ -13,7 +15,8 @@ ENV ARDUINO_CLI_VERSION=0.29.0 \
LTR329_LIBRARY_URL=https://github.com/sensebox/LTR329-Lightsensor-Arduino-Library/archive/refs/heads/main.zip \
SDS011S_LIBRARY_URL=https://github.com/sensebox/SDS011-select-serial/archive/refs/heads/master.zip \
VEML6070_LIBRARY_URL=https://github.com/sensebox/VEML6070-UV-Arduino-Library/archive/refs/heads/main.zip \
AMS5915_LIBRARY_URL=https://github.com/bolderflight/ams5915/archive/refs/heads/main.zip
AMS5915_LIBRARY_URL=https://github.com/bolderflight/ams5915/archive/refs/heads/main.zip \
PHYPHOX_BETA_URL=https://github.com/sensebox/phyphox-arduino/archive/refs/tags/v1.2.2-beta.zip

RUN apt-get update && apt-get install -y xz-utils unzip wget

Expand All @@ -35,6 +38,13 @@ RUN arduino-cli core install arduino:samd@${ARDUINO_SAMD_VERSION}
RUN curl -o /root/.arduino15/package_sensebox_index.json ${SENSEBOXCORE_URL}
RUN arduino-cli --additional-urls ${SENSEBOXCORE_URL} core install sensebox:samd

# install ESP32
RUN apt-get install -y python3-pip
RUN pip install pyserial
RUN curl -o /root/.arduino15/package_esp32_index.json ${ESP32CORE_URL}
RUN arduino-cli --additional-urls ${ESP32CORE_URL} core install esp32:esp32


RUN wget -O ssd1306_plot_library.zip $SSD1306_PLOT_LIBRARY_URL \
&& arduino-cli lib install --zip-path ssd1306_plot_library.zip \
&& wget -O sensebox_libweb.zip $SENSEBOX_LIBWEB_URL \
Expand All @@ -52,7 +62,9 @@ RUN wget -O ssd1306_plot_library.zip $SSD1306_PLOT_LIBRARY_URL \
&& wget -O veml6070_library.zip $VEML6070_LIBRARY_URL \
&& arduino-cli lib install --zip-path veml6070_library.zip \
&& wget -O ams5915_library.zip $AMS5915_LIBRARY_URL \
&& arduino-cli lib install --zip-path ams5915_library.zip
&& arduino-cli lib install --zip-path ams5915_library.zip \
&& wget -O phyphox_beta_library.zip $PHYPHOX_BETA_URL \
&& arduino-cli lib install --zip-path phyphox_beta_library.zip

# install Libraries with arduino-cli
RUN arduino-cli lib install "Ethernet"
Expand All @@ -68,6 +80,7 @@ RUN arduino-cli lib install "Adafruit GFX Library"
RUN arduino-cli lib install "Adafruit MQTT Library"
RUN arduino-cli lib install "Adafruit BusIO"
RUN arduino-cli lib install "Adafruit SleepyDog Library"
RUN arduino-cli lib install "Adafruit MPU6050"
RUN arduino-cli lib install "DallasTemperature"
RUN arduino-cli lib install "ArduinoBearSSL"
RUN arduino-cli lib install "ArduinoECCX08"
Expand All @@ -84,14 +97,19 @@ RUN arduino-cli lib install "SD"
RUN arduino-cli lib install "BSEC Software Library"
RUN arduino-cli lib install "TheThingsNetwork"
RUN arduino-cli lib install "NTPClient"
RUN arduino-cli lib install "phyphox BLE"
#RUN arduino-cli lib install "phyphox BLE" //remove until final release
RUN arduino-cli lib install "UniversalTelegramBot"
RUN arduino-cli lib install "Servo"
RUN arduino-cli lib install "RTCZero"
RUN arduino-cli lib install "sensirion-sps"
RUN arduino-cli lib install "TinyGPSPlus"
RUN arduino-cli lib install "SenseBoxBLE"
RUN arduino-cli lib install "Bolder Flight Systems Unit Conversions"
RUN arduino-cli lib install "HX711"
RUN arduino-cli lib install "STM32duino VL53L8CX"
RUN arduino-cli lib install "Adafruit ICM20X"
RUN arduino-cli lib install "NeoGPS"
RUN arduino-cli lib install "Adafruit NeoMatrix"


WORKDIR /app
Expand Down
31 changes: 24 additions & 7 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM node:17

ENV ARDUINO_CLI_VERSION=0.21.1 \
ENV ARDUINO_CLI_VERSION=0.34.2 \
SENSEBOXCORE_VERSION=2.0.0 \
ARDUINO_SAMD_VERSION=1.8.13 \
ARDUINO_AVR_VERSION=1.8.5 \
ESP32_VERSION=2.0.9 \
SENSEBOXCORE_URL=https://raw.githubusercontent.com/mariopesch/senseBoxMCU-core/master/package_sensebox_index.json \
ESP32CORE_URL=https://mariopesch.github.io/sensebox-esp32-dev/package_esp32_index.json \
SSD1306_PLOT_LIBRARY_URL=https://github.com/sensebox/SSD1306-Plot-Library/archive/refs/tags/v1.0.0.zip \
SENSEBOX_LIBWEB_URL=https://github.com/sensebox/sensebox-libweb/archive/refs/heads/master.zip \
SDS011_LIBRARY_URL=https://github.com/sensebox/SDS011-select-serial/archive/refs/heads/master.zip \
Expand All @@ -13,7 +15,7 @@ ENV ARDUINO_CLI_VERSION=0.21.1 \
LTR329_LIBRARY_URL=https://github.com/sensebox/LTR329-Lightsensor-Arduino-Library/archive/refs/heads/main.zip \
SDS011S_LIBRARY_URL=https://github.com/sensebox/SDS011-select-serial/archive/refs/heads/master.zip \
VEML6070_LIBRARY_URL=https://github.com/sensebox/VEML6070-UV-Arduino-Library/archive/refs/heads/main.zip \
TINYGPS_LIBRARY_URL=https://github.com/mikalhart/TinyGPSPlus/archive/refs/tags/v1.0.2b.zip
AMS5915_LIBRARY_URL=https://github.com/bolderflight/ams5915/archive/refs/heads/main.zip

RUN apt-get update && apt-get install -y xz-utils unzip wget

Expand All @@ -35,6 +37,13 @@ RUN arduino-cli core install arduino:samd@${ARDUINO_SAMD_VERSION}
RUN curl -o /root/.arduino15/package_sensebox_index.json ${SENSEBOXCORE_URL}
RUN arduino-cli --additional-urls ${SENSEBOXCORE_URL} core install sensebox:samd

# install ESP32
RUN apt-get install -y python3-pip
RUN pip install pyserial
RUN curl -o /root/.arduino15/package_esp32_index.json ${ESP32CORE_URL}
RUN arduino-cli --additional-urls ${ESP32CORE_URL} core install esp32:esp32


RUN wget -O ssd1306_plot_library.zip $SSD1306_PLOT_LIBRARY_URL \
&& arduino-cli lib install --zip-path ssd1306_plot_library.zip \
&& wget -O sensebox_libweb.zip $SENSEBOX_LIBWEB_URL \
Expand All @@ -50,9 +59,9 @@ RUN wget -O ssd1306_plot_library.zip $SSD1306_PLOT_LIBRARY_URL \
&& wget -O sds011_select_library.zip $SDS011S_LIBRARY_URL \
&& arduino-cli lib install --zip-path sds011_select_library.zip \
&& wget -O veml6070_library.zip $VEML6070_LIBRARY_URL \
&& arduino-cli lib install --zip-path veml6070_library.zip \
&& wget -O tinygps_library.zip $TINYGPS_LIBRARY_URL \
&& arduino-cli lib install --zip-path tinygps_library.zip
&& arduino-cli lib install --zip-path veml6070_library.zip \
&& wget -O ams5915_library.zip $AMS5915_LIBRARY_URL \
&& arduino-cli lib install --zip-path ams5915_library.zip

# install Libraries with arduino-cli
RUN arduino-cli lib install "Ethernet"
Expand All @@ -68,6 +77,7 @@ RUN arduino-cli lib install "Adafruit GFX Library"
RUN arduino-cli lib install "Adafruit MQTT Library"
RUN arduino-cli lib install "Adafruit BusIO"
RUN arduino-cli lib install "Adafruit SleepyDog Library"
RUN arduino-cli lib install "Adafruit MPU6050"
RUN arduino-cli lib install "DallasTemperature"
RUN arduino-cli lib install "ArduinoBearSSL"
RUN arduino-cli lib install "ArduinoECCX08"
Expand All @@ -86,14 +96,21 @@ RUN arduino-cli lib install "TheThingsNetwork"
RUN arduino-cli lib install "NTPClient"
RUN arduino-cli lib install "phyphox BLE"
RUN arduino-cli lib install "UniversalTelegramBot"
RUN arduino-cli lib install "Servo"
RUN arduino-cli lib install "RTCZero"
RUN arduino-cli lib install "sensirion-sps"
RUN arduino-cli lib install "TinyGPSPlus"
RUN arduino-cli lib install "SenseBoxBLE"
RUN arduino-cli lib install "Bolder Flight Systems Unit Conversions"
RUN arduino-cli lib install "HX711"


WORKDIR /app

COPY package.json /app
COPY yarn.lock /app

RUN yarn

RUN yarn
COPY src /app/src
COPY test /app/test

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can also run the container image mutliple times. See [Scaling with docker-co
- have `application/json` as `content-type`
- contain a valid JSON string with keys `board` and `sketch` with non-empty values.

Possible `board` values are `sensebox-mcu` for the new senseBox MCU and `sensebox` for the old Arduino Uno based senseBox.
Possible `board` values are `sensebox-mcu` for the new senseBox MCU, `sensebox` for the old Arduino Uno based senseBox and `sensebox-esp32s2` for the esp32s2 based MCU.

The `sketch` value should be a valid Arduino sketch.

Expand Down
6 changes: 4 additions & 2 deletions src/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ const fs = require("fs");

const boardFQBNs = {
"sensebox-mcu": "sensebox:samd:sb:power=on",
sensebox: "arduino:avr:uno",
"sensebox": "arduino:avr:uno",
"sensebox-esp32s2": "esp32:esp32:sensebox_mcu_esp32s2",
};

const validBoards = Object.keys(boardFQBNs);

const boardBinaryFileextensions = {
"sensebox-mcu": "bin",
sensebox: "hex",
"sensebox": "hex",
"sensebox-esp32s2": "bin",
};

const baseArgs = ["--build-cache-path", `/app/src/build-cache`];
Expand Down
Loading
Loading