Files
mongoose-touch/mos.yml
Pim van Pelt ecf0a9a2fc Add tft.enable flag, gate the use of ILI9341/STMPE610 on it.
- For esp8266 (lightswitch w/o touchscreen), set tft.enable=false
- For esp32 (lightswitch w/ touchscreen), set it to true.

Clean up mos.yml flags per architecture type.
- Button is always 0,2
- Relay0 at 16 for ESP8266, as that's NodeMCU v2's onboard LED.
- Relay0 at 13 for ESP32, as that's Featherwing's onboard LED
2017-12-22 10:23:15 +01:00

115 lines
4.0 KiB
YAML

author: Pim van Pelt <pim@ipng.nl>
description: A Mongoose-OS Huzzah32 Featherwing
version: 1.0
platform: esp32
platforms: [ esp8266, esp32 ]
libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}
tags:
- c
- hw
# List of files / directories with C sources. No slashes at the end of dir names.
sources:
- src
includes:
- include
# List of dirs. Files from these dirs will be copied to the device filesystem
filesystem:
- fs
config_schema:
# - ["debug.level", 4]
# - ["spi.debug", true]
- ["wifi.ap.enable", false]
- ["wifi.sta.enable", true]
- ["wifi.sta.ssid", "dapches-iot"]
- ["wifi.sta.pass", "marielle"]
- ["tft", "o", {title: "TFT settings"}]
- ["tft.enable", "b", {"title": "Enable STMPE610 and ILI9341"}]
- ["tft.orientation", "i", {title: "Orientation; 0=PORTRAIT 1=LANDSCAPE 2=PORTRAIT_FLIP 3=LANDSCAPE_FLIP"}]
- ["tft.orientation", 1]
- ["tft.width", "i", {title: "TFT width in pixels"}]
- ["tft.height", "i", {title: "TFT height in pixels"}]
- ["tft.width", 480] # Set to 320 for 2.4" Featherwing, set to 480 for 3.5" Featherwing
- ["tft.height", 320] # Set to 240 for 2.4" Featherwing, set to 320 for 3.5" Featherwing
- ["app", "o", {title: "APP settings"}]
- ["app.hostname", "s", {title: "Device hostname"}]
- ["app.hostname", "Mongoose Touch"]
- ["app.backlight_pin", "i", {title: "Backlight pin"}]
- ["app.backlight_pin", 22]
- ["app.inactivity_timeout", "i", {title: "Inactivity timeout in seconds"}]
- ["app.inactivity_timeout", 10]
- ["app.battery_calibration", i, {title: "Battery ADC value at 4000mV"}]
- ["app.buttons", "s", {title: "comma-separated list of button pins"}]
- ["app.relays", "s", {title: "comma-separated list of relay pins"}]
- ["spi.enable", true]
- ["spi.cs1_gpio", -1]
- ["spi.cs2_gpio", -1]
- ["ili9341.cs_index", 0]
- ["stmpe610.cs_index", 1]
- ["stmpe610.orientation", 5] # Set to 4 for 2.4" Featherwing, set to 5 for 3.5" Featherwing
- ["mqtt.enable", true]
- ["http.enable", true]
- ["mqtt.server", "mqtt.ipng.nl:8883"]
- ["mqtt.ssl_ca_cert", "mqtt.pem"]
- ["rpc.mqtt.enable", true]
conds:
- when: mos.platform == "esp32"
apply:
build_vars:
MGOS_PLATFORM_ESP32: 1
config_schema:
- ["sys.esp32_adc_vref", 3300] # ADC Vref is 3.3V
- ["spi.mosi_gpio", 18]
- ["spi.miso_gpio", 19]
- ["spi.sclk_gpio", 5]
- ["spi.cs0_gpio", 15] # ILI9341
- ["spi.cs1_gpio", 32] # STMPE610
- ["ili9341.dc_pin", 33]
- ["stmpe610.irq_pin", 23]
- ["tft.enable", true]
- ["app.buttons", "0,2"]
- ["app.relays", "13,12,14,16"]
- ["tft.enable", true]
- ["app.battery_calibration", 2360]
- when: mos.platform == "esp8266"
apply:
build_vars:
MGOS_PLATFORM_ESP8266: 1
config_schema:
- ["tft.enable", false]
- ["app.buttons", "0,2"]
- ["app.relays", "16,12,13,14"]
- ["app.battery_calibration", -1]
# List of libraries used by this app, in order of initialisation
libs:
- origin: https://github.com/mongoose-os-libs/wifi
- origin: https://github.com/mongoose-os-libs/http-server
- origin: https://github.com/mongoose-os-libs/rpc-service-config
- origin: https://github.com/mongoose-os-libs/rpc-service-fs
- origin: https://github.com/mongoose-os-libs/prometheus-metrics
- origin: https://github.com/mongoose-os-libs/rpc-common
- origin: https://github.com/mongoose-os-libs/rpc-service-config
- origin: https://github.com/mongoose-os-libs/rpc-mqtt
- origin: https://github.com/mongoose-os-libs/mqtt
- origin: https://github.com/mongoose-os-libs/pwm
- origin: https://github.com/mongoose-os-libs/adc
- origin: https://github.com/mongoose-os-libs/spi
- origin: https://github.com/mongoose-os-libs/ili9341-spi
- origin: https://github.com/mongoose-os-libs/stmpe610-spi
- origin: libs/rpc-service-ota
# Used by the mos tool to catch mos binaries incompatible with this file format
manifest_version: 2017-05-18