move hal files from /src to /shared

This commit is contained in:
cyberman54 committed 2023-07-01 18:32:33 +02:00
1 parent c73b190137
commit 2deaec1aed
38 files changed
+56 -55

No files matched your search

+2 -1
View File
@@ -23,7 +23,8 @@ config.read("platformio.ini")
srcdir = env.get("PROJECT_SRC_DIR")
# get hal path
haldir = os.path.join (srcdir, "hal")
prjdir = env.get("PROJECT_DIR")
haldir = os.path.join (prjdir, "shared/hal")
# check if hal file is present in source directory
halconfig = config.get("board", "halfile")
+29
View File
@@ -0,0 +1,29 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _EBOX_H
#define _EBOX_H
#include <stdint.h>
// Hardware related definitions for ebox ESP32-bit with external connected RFM95 LoRa
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1
#define HAS_LED (23) // blue LED on board
#define HAS_BUTTON (0) // button "PROG" on board
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (14)
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 LMIC_UNUSED_PIN
#endif
+32
View File
@@ -0,0 +1,32 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _EBOXTUBE_H
#define _EBOXTUBE_H
#include <stdint.h>
// Hardware related definitions for ebox ESP32-bit with external connected RFM95 LoRa
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1
#define HAS_LED (22) // Green LED on board
#define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_2, GRB>(leds, RGB_LED_COUNT);
#define HAS_BUTTON (0) // button "FLASH" on board
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (14)
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 (32)
#endif
+56
View File
@@ -0,0 +1,56 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _GENERIC_H
#define _GENERIC_H
#include <stdint.h>
#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no LoRa
#define CFG_sx1276_radio 1 // select LoRa chip
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_DISPLAY 1
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER ((82.0+220.0)/82.0) // 82k + 220k 1%
//#define BAT_MEASURE_EN EXT_POWER_SW // Turn power on for measurement
#define EXT_POWER_SW 15 // Switch VDD on pin JP10, needed for RTC DS3231
#define EXT_POWER_ON 0
#define HAS_LED (2) // on board green LED
#define HAS_TWO_LED (12) // on board red LED
//#define HAS_BUTTON (0) // on board button -> don't use, is same as RTC_INT!
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA SDA
#define MY_DISPLAY_SCL SCL
#define MY_DISPLAY_RST NOT_A_PIN
// Settings for on board DS3231 RTC chip
// note: to use RTC_INT, capacitor 100nF next to red LED must be removed to sharpen interrupt signal slope
// and setting EXT_POWER_ON is needed (this is done in main.cpp)
#define HAS_RTC MY_DISPLAY_SDA, MY_DISPLAY_SCL // SDA, SCL
#define RTC_INT GPIO_NUM_0 //
// Settings for IF482 interface
//#define HAS_IF482 9600, SERIAL_7E1, GPIO_NUM_3, GPIO_NUM_1 // RX, TX
// Settings for DCF77 interface
//#define HAS_DCF77 GPIO_NUM_14 // JP8 #13
//#define DCF77_ACTIVE_LOW 1
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST (17)
#define LORA_IRQ (16)
#define LORA_IO1 (14) // JP8 #13 to be external wired
#define LORA_IO2 LMIC_UNUSED_PIN
#endif
+34
View File
@@ -0,0 +1,34 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _FIPY_H
#define _FIPY_H
#include <stdint.h>
// Hardware related definitions for Pycom FiPy Board
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1272_radio 1
#define HAS_LED NOT_A_PIN // FiPy has no on board LED, so we use RGB LED
#define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_0, GRB>(leds, RGB_LED_COUNT);
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST LMIC_UNUSED_PIN
#define LORA_IRQ (23) // LoRa IRQ
#define LORA_IO1 (23) // Pin tied via diode to DIO0
#define LORA_IO2 LMIC_UNUSED_PIN
// select WIFI antenna (internal = onboard / external = u.fl socket)
#define HAS_ANTENNA_SWITCH GPIO_NUM_21 // pin for switching wifi antenna
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
#endif
+108
View File
@@ -0,0 +1,108 @@
// clang-format off
// upload_speed 115200
// board esp32dev
#ifndef _GENERIC_H
#define _GENERIC_H
#include <stdint.h>
// Hardware related definitions for generic ESP32 boards
// generic.h is kitchensink with all available options
#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no LoRa
//#define HAS_SPI 1 // comment out if device shall not send data via SPI
// pin definitions for SPI slave interface
//#define SPI_MOSI GPIO_NUM_23
//#define SPI_MISO GPIO_NUM_19
//#define SPI_SCLK GPIO_NUM_18
//#define SPI_CS GPIO_NUM_5
// enable only if you want to store a local paxcount table on the device
#define HAS_SDCARD 1 // this board has an SD-card-reader/writer
// Pins for SD-card
#define SDCARD_CS (13)
#define SDCARD_MOSI (15)
#define SDCARD_MISO (2)
#define SDCARD_SCLK (14)
// enable only if device has these sensors, otherwise comment these lines
// tutorial to connect BME sensor see here:
// https://sbamueller.wordpress.com/2019/02/26/paxcounter-mit-umweltsensor/
//
// in platformio.ini append
// lib_deps = <...> ${common.lib_deps_sensors}
// for loading necessary libraries
// BME680 sensor on I2C bus
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME680 GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
//#define BME680_ADDR BME68X_I2C_ADDR_LOW // connect SDIO of BME680 to GND
// BME280 sensor on I2C bus
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME280 GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
//#define BME280_ADDR 0x76 // change to 0x77 depending on your wiring
// BMP180 sensor on I2C bus
//#define HAS_BMP180
//#define BMP180_ADDR 0x77
// SDS011 dust sensor settings
//#define HAS_SDS011 1 // use SDS011
// used pins on the ESP-side:
//#define SDS_TX 19 // connect to RX on the SDS011
//#define SDS_RX 23 // connect to TX on the SDS011
// up to three user defined sensors (if connected)
//#define HAS_SENSOR_1 1 // comment out if device has user defined sensor #1
//#define HAS_SENSOR_2 1 // comment out if device has user defined sensor #2
//#define HAS_SENSOR_3 1 // comment out if device has user defined sensor #3
#define CFG_sx1276_radio 1 // select LoRa chip
//#define CFG_sx1272_radio 1 // select LoRa chip
//#define BOARD_HAS_PSRAM // use if board has external SPIRAM, note: this will reduce IRAM0 by 64KB for SPIRAM cache
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
//#define HAS_DISPLAY 1
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
#define HAS_LED (21) // on board LED
#define HAS_BUTTON (39) // on board button
//#define RGB_LED_COUNT 1 // we have 1 LED
//#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_0, GRB>(leds, RGB_LED_COUNT);
// GPS settings
//#define HAS_GPS 1 // use on board GPS
//#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M RX, TX
//#define GPS_INT GPIO_NUM_13 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO13
// Pins for I2C interface of OLED Display
//#define MY_DISPLAY_SDA (4)
//#define MY_DISPLAY_SCL (15)
//#define MY_DISPLAY_RST (16)
// Settings for on board DS3231 RTC chip
//#define HAS_RTC MY_DISPLAY_SDA, MY_DISPLAY_SCL // SDA, SCL
//#define RTC_INT GPIO_NUM_34 // timepulse with accuracy +/- 2*e-6 [microseconds] = 0,1728sec / day
// Settings for IF482 interface
//#define HAS_IF482 9600, SERIAL_7E1, GPIO_NUM_12, GPIO_NUM_14 // IF482 serial port parameters
// Settings for DCF77 interface
//#define HAS_DCF77 GPIO_NUM_1
//#define DCF77_ACTIVE_LOW 1
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (14)
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 LMIC_UNUSED_PIN
#endif
+36
View File
@@ -0,0 +1,36 @@
// clang-format off
// upload_speed 921600
// board heltec_wifi_lora_32
#ifndef _HELTEC_H
#define _HELTEC_H
#include <stdint.h>
// Hardware related definitions for Heltec V1 LoRa-32 Board
// see https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html#v1
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1
#define HAS_DISPLAY 1 // OLED-Display on board
#define HAS_LED LED_BUILTIN // white LED on board (set to NOT_A_PIN to disable)
#define HAS_BUTTON KEY_BUILTIN // button "PROG" on board
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA SDA_OLED
#define MY_DISPLAY_SCL SCL_OLED
#define MY_DISPLAY_RST RST_OLED
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_IRQ DIO0
#define LORA_IO1 DIO1
#define LORA_IO2 DIO2
#define LORA_SCK SCK
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST RST_LoRa
#define LORA_CS SS
#endif
+44
View File
@@ -0,0 +1,44 @@
// clang-format off
// upload_speed 921600
// board heltec_wifi_lora_32_V2
#ifndef _HELTECV2_H
#define _HELTECV2_H
#include <stdint.h>
// Hardware related definitions for Heltec V2 LoRa-32 Board
// see https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html#v2
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1
#define HAS_DISPLAY 1 // OLED-Display on board
#define HAS_LED LED_BUILTIN // white LED on board (set to NOT_A_PIN to disable)
#define HAS_BUTTON KEY_BUILTIN // button "PROG" on board
#define BAT_MEASURE_ADC ADC2_GPIO13_CHANNEL // battery probe GPIO pin
#define BAT_MEASURE_ADC_UNIT 2 // ADC 2
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 220k/100k on board
// switches battery power and Vext, switch logic 0 = on / 1 = off
#define EXT_POWER_SW Vext
#define EXT_POWER_ON 0
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA SDA_OLED
#define MY_DISPLAY_SCL SCL_OLED
#define MY_DISPLAY_RST RST_OLED
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_IRQ DIO0
#define LORA_IO1 DIO1
#define LORA_IO2 DIO2
#define LORA_SCK SCK
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST RST_LoRa
#define LORA_CS SS
#endif
+43
View File
@@ -0,0 +1,43 @@
// clang-format off
// upload_speed 921600
// board heltec_wifi_lora_32_V2
#ifndef _HELTECV21_H
#define _HELTECV21_H
#include <stdint.h>
// Hardware related definitions for Heltec V2.1 LoRa-32 Board
// see https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html#v2-1
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1
#define HAS_DISPLAY 1 // OLED-Display on board
#define HAS_LED LED_BUILTIN // white LED on board (set to NOT_A_PIN to disable)
#define HAS_BUTTON KEY_BUILTIN // button "PROG" on board
#define BAT_MEASURE_ADC ADC1_GPIO37_CHANNEL // battery probe GPIO pin
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 220k/100k on board
// switches battery power and Vext, switch logic 0 = on / 1 = off
#define EXT_POWER_SW Vext
#define EXT_POWER_ON 0
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA SDA_OLED
#define MY_DISPLAY_SCL SCL_OLED
#define MY_DISPLAY_RST RST_OLED
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_IRQ DIO0
#define LORA_IO1 DIO1
#define LORA_IO2 DIO2
#define LORA_SCK SCK
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST RST_LoRa
#define LORA_CS SS
#endif
+21
View File
@@ -0,0 +1,21 @@
// clang-format off
// upload_speed 921600
// board lolin32
#ifndef _LOLINLITE_H
#define _LOLINLITE_H
#include <stdint.h>
// Hardware related definitions for lolin32lite (without LoRa shield)
#define HAS_LED LED_BUILTIN // on board LED on GPIO5
#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW (set to NOT_A_PIN to disable)
#define MY_SDA SDA
#define MY_SCL SCL
// disable brownout detection (avoid unexpected reset on some boards)
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#endif
+47
View File
@@ -0,0 +1,47 @@
// clang-format off
// upload_speed 921600
// board lolin32
#ifndef _LOLINLITELORA_H
#define _LOLINLITELORA_H
#include <stdint.h>
// Hardware related definitions for lolin32 lite with loraNode32 shield
// See https://github.com/hallard/LoLin32-Lite-Lora
// disable brownout detection (avoid unexpected reset on some boards)
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_DISPLAY 1 // OLED-Display on board
//#define MY_DISPLAY_FLIP 1 // uncomment this for rotated display
#define HAS_LED 22 // ESP32 GPIO12 (pin22) On Board LED (set to NOT_A_PIN to disable)
#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
#define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_0, GRB>(leds, RGB_LED_COUNT);
#define HAS_BUTTON 15 // ESP32 GPIO15 (pin15) Button is on the LoraNode32 shield
#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // RFM95 module
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST (25)
#define LORA_IRQ (27)
#define LORA_IO1 (26)
#define LORA_IO2 (4)
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA (12)
#define MY_DISPLAY_SCL (14)
#define MY_DISPLAY_RST NOT_A_PIN
// I2C config for Microchip 24AA02E64 DEVEUI unique address
#define MCP_24AA02E64_I2C_ADDRESS 0x50 // I2C address for the 24AA02E64
#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
#endif
+48
View File
@@ -0,0 +1,48 @@
// clang-format off
// upload_speed 921600
// board lolin32
#ifndef _LOLINLORA_H
#define _LOLINLORA_H
#include <stdint.h>
// Hardware related definitions for lolin32 with loraNode32 shield
// See https://github.com/hallard/LoLin32-Lora
// disable brownout detection (avoid unexpected reset on some boards)
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_DISPLAY 1 // OLED-Display on board
//#define MY_DISPLAY_FLIP 1 // uncomment this for rotated display
#define HAS_LED NOT_A_PIN // Led os on same pin as Lora SS pin, to avoid problems, we don't use it
#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
// Anyway shield is on over the LoLin32 board, so we won't be able to see this LED
#define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_13, GRB>(leds, RGB_LED_COUNT);
#define HAS_BUTTON 15 // ESP32 GPIO15 (pin15) Button is on the LoraNode32 shield
#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // RFM95 module
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST (25)
#define LORA_IRQ (27)
#define LORA_IO1 (26)
#define LORA_IO2 (4)
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA SDA
#define MY_DISPLAY_SCL SCL
#define MY_DISPLAY_RST NOT_A_PIN
// I2C config for Microchip 24AA02E64 DEVEUI unique address
#define MCP_24AA02E64_I2C_ADDRESS 0x50 // I2C address for the 24AA02E64
#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
#endif
+33
View File
@@ -0,0 +1,33 @@
// clang-format off
// upload_speed 921600
// board lopy
#ifndef _LOPY_H
#define _LOPY_H
#include <stdint.h>
// Hardware related definitions for Pycom LoPy Board (NOT LoPy4)
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1272_radio 1
#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
#define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_0, GRB>(leds, RGB_LED_COUNT);
// Note: Pins for LORA chip SPI interface come from board file pins_arduino.h
// select WIFI antenna (internal = onboard / external = u.fl socket)
#define HAS_ANTENNA_SWITCH (16) // pin for switching wifi antenna
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
// uncomment this only if your LoPy runs on a EXPANSION BOARD
//#define HAS_LED (12) // use if LoPy is on Expansion Board, this has a user LED
//#define LED_ACTIVE_LOW 1 // use if LoPy is on Expansion Board, this has a user LED
//#define HAS_BUTTON (13) // user button on expansion board
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
//#define BAT_MEASURE_ADC ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
//#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 1MOhm/1MOhm -> expansion board 3.0
//#define BAT_VOLTAGE_DIVIDER 4 // voltage divider 115kOhm/56kOhm -> expansion board 2.0
#endif
+42
View File
@@ -0,0 +1,42 @@
// clang-format off
// upload_speed 921600
// board lopy4
#ifndef _LOPY4_H
#define _LOPY4_H
#include <stdint.h>
// Hardware related definitions for Pycom LoPy4 Board
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
//#defin HAS_SPI 1 // comment out if device shall not send data via SPI
// pin definitions for local wired SPI slave interface
//#define SPI_MOSI GPIO_NUM_22
//#define SPI_MISO GPIO_NUM_33
//#define SPI_SCLK GPIO_NUM_26
//#define SPI_CS GPIO_NUM_36
#define CFG_sx1276_radio 1
#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
#define RGB_LED_COUNT 1 // we have 1 LED
#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_0, GRB>(leds, RGB_LED_COUNT);
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM
// Note: Pins for LORA chip SPI interface come from board file pins_arduino.h
// select WIFI antenna (internal = onboard / external = u.fl socket)
#define HAS_ANTENNA_SWITCH (21) // pin for switching wifi antenna (P12)
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
// uncomment defines in this section ONLY if your LoPy lives on a EXPANSION BOARD
//#define HAS_LED (12) // use if LoPy is on Expansion Board, this has a user LED
//#define LED_ACTIVE_LOW 1 // use if LoPy is on Expansion Board, this has a user LED
//#define HAS_BUTTON (13) // user button on expansion board
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
//#define BAT_MEASURE_ADC ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
//#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 1MOhm/1MOhm -> expansion board 3.0
//#define BAT_VOLTAGE_DIVIDER 4 // voltage divider 115kOhm/56kOhm -> expansion board 2.0
#endif
+61
View File
@@ -0,0 +1,61 @@
// clang-format off
// upload_speed 921600
// board m5stack-core-esp32
#ifndef _M5CORE_H
#define _M5CORE_H
#include <stdint.h>
#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no M5 RA01 LoRa module
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST GPIO_NUM_26
#define LORA_IRQ GPIO_NUM_36
#define LORA_IO1 GPIO_NUM_34 // must be wired by you on PCB!
#define LORA_IO2 LMIC_UNUSED_PIN
// enable only if you want to store a local paxcount table on the device
#define HAS_SDCARD 1 // this board has an SD-card-reader/writer
// Pins for SD-card
#define SDCARD_CS GPIO_NUM_4
#define SDCARD_MOSI MOSI
#define SDCARD_MISO MISO
#define SDCARD_SCLK SCK
#define CFG_sx1276_radio 1 // select LoRa chip
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_LED NOT_A_PIN // no on board LED (?)
#define HAS_BUTTON (39) // on board button A
// power management settings
#define HAS_IP5306 1 // has IP5306 chip
#define PMU_CHG_CURRENT 2 // battery charge current
// possible values: 0:200mA, 1:400mA, *2:500mA, 3:600mA
#define PMU_CHG_CUTOFF 0 // battery charge cutoff
// possible values: *0:4.2V, 1:4.3V, 2:4.35V, 3:4.4V
// Optional GPS Module settings
//#define HAS_GPS 1 // use GPS
//#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_17, GPIO_NUM_16 // UBlox NEO M8N RX,TX
//#define GPS_INT GPIO_NUM_36 // 30ns accurary timepulse, to be external wired on pcb: shorten R12!
// Display Settings
#define HAS_DISPLAY 2 // TFT-LCD
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define MY_DISPLAY_WIDTH 320
#define MY_DISPLAY_HEIGHT 240
#define TFT_MOSI MOSI // SPI
#define TFT_MISO MISO // SPI
#define TFT_SCLK SCK // SPI
#define TFT_CS GPIO_NUM_14 // Chip select control
#define TFT_DC GPIO_NUM_27 // Data Command control
#define TFT_RST GPIO_NUM_33 // Reset
#define TFT_BL GPIO_NUM_32 // LED back-light
#define TFT_FREQUENCY 40000000
#define TFT_TYPE LCD_ILI9341, FLAGS_NONE, TFT_FREQUENCY, TFT_CS, TFT_DC, TFT_RST, TFT_BL, TFT_MISO, TFT_MOSI, TFT_SCLK
#endif
+66
View File
@@ -0,0 +1,66 @@
// clang-format off
// upload_speed 921600
// board m5stack-fire
// note use of GPIO16/17
// https://www.bjoerns-techblog.de/2019/03/m5stack-fire-eine-uebersicht/
#ifndef _M5FIRE_H
#define _M5FIRE_H
#include <stdint.h>
#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no M5 RA01 LoRa module
#define LORA_SCK SCK
#define LORA_CS SS
#define LORA_MISO MISO
#define LORA_MOSI MOSI
#define LORA_RST GPIO_NUM_26
#define LORA_IRQ GPIO_NUM_36
#define LORA_IO1 GPIO_NUM_34 // must be wired by you on PCB!
#define LORA_IO2 LMIC_UNUSED_PIN
// enable only if you want to store a local paxcount table on the device
//#define HAS_SDCARD 1 // this board has an SD-card-reader/writer
//#define SDCARD_CS GPIO_NUM_4
//#define SDCARD_MOSI MOSI
//#define SDCARD_MISO MISO
//#define SDCARD_SCLK SCK
#define CFG_sx1276_radio 1 // select LoRa chip
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_LED NOT_A_PIN // no on board LED (?)
//#define RGB_LED_COUNT 10 // M5fire has a stripe of 10 RGB Pixels
//#define HAS_RGB_LED FastLED.addLeds<SK6812, GPIO_NUM_15, GRB>(leds, RGB_LED_COUNT);
#define HAS_BUTTON (39) // on board button A
// power management settings
#define HAS_IP5306 1 // has IP5306 chip
#define PMU_CHG_CURRENT 2 // battery charge current
// possible values: 0:200mA, 1:400mA, *2:500mA, 3:600mA
#define PMU_CHG_CUTOFF 0 // battery charge cutoff
// possible values: *0:4.2V, 1:4.3V, 2:4.35V, 3:4.4V
// Optional GPS Module settings
//#define HAS_GPS 1 // use GPS
//#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_5, GPIO_NUM_13 // to be external wired on pcb: open R1 & R4, and shorten R2 & R5
//#define GPS_INT GPIO_NUM_36 // 30ns accurary timepulse, to be external wired on pcb: shorten R12!
// Display Settings
#define HAS_DISPLAY 2 // TFT-LCD
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define MY_DISPLAY_WIDTH 320
#define MY_DISPLAY_HEIGHT 240
#define TFT_MOSI MOSI // SPI
#define TFT_MISO MISO // SPI
#define TFT_SCLK SCK // SPI
#define TFT_CS GPIO_NUM_14 // Chip select control
#define TFT_DC GPIO_NUM_27 // Data Command control
#define TFT_RST GPIO_NUM_33 // Reset
#define TFT_BL GPIO_NUM_32 // LED back-light
#define TFT_FREQUENCY 40000000
#define TFT_TYPE LCD_ILI9341, FLAGS_NONE, TFT_FREQUENCY, TFT_CS, TFT_DC, TFT_RST, TFT_BL, TFT_MISO, TFT_MOSI, TFT_SCLK
#endif
+50
View File
@@ -0,0 +1,50 @@
// clang-format off
// upload_speed 921600
// board featheresp32
#ifndef _OCTOPUS_H
#define _OCTOPUS_H
#include <stdint.h>
// Hardware related definitions for #IoT Octopus32 with the Adafruit LoRaWAN Wing
// You can use this configuration also with the Adafruit ESP32 Feather + the LoRaWAN Wing
// In this config we use the Adafruit OLED Wing which is only 128x32 pixel, need to find a smaller font
// NOTE: if LORA_IRQ and LORA_IO1 are tied to the same GPIO using diodes on the board,
// you must disable LMIC_USE_INTERRUPTS in lmic_config.h
// disable brownout detection (avoid unexpected reset on some boards)
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
// Octopus32 has a pre-populated BME680 on i2c addr 0x76
#define HAS_BME 1 // Enable BME sensors in general
#define HAS_BME680 GPIO_NUM_23, GPIO_NUM_22 // SDA, SCL
#define BME680_ADDR BME68X_I2C_ADDR_LOW // connect SDIO of BME680 to GND
#define HAS_LED 13 // ESP32 GPIO12 (pin22) On Board LED
//#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
//#define RGB_LED_COUNT 1 // we have 1 LED
//#define HAS_RGB_LED FastLED.addLeds<WS2812, GPIO_NUM_13, GRB>(leds, RGB_LED_COUNT);
//#define HAS_BUTTON 15 // ESP32 GPIO15 (pin15) Button is on the LoraNode32 shield
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // RFM95 module
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (14)
#define LORA_MISO (19)
#define LORA_MOSI (18)
#define LORA_RST LMIC_UNUSED_PIN
#define LORA_IRQ (33)
#define LORA_IO1 (33)
#define LORA_IO2 LMIC_UNUSED_PIN
// Pins for I2C interface of OLED Display
#define HAS_DISPLAY 1
//#define MY_DISPLAY_FLIP 1 // uncomment this for rotated display
#define MY_DISPLAY_SDA (23)
#define MY_DISPLAY_SCL (22)
#define MY_DISPLAY_RST NOT_A_PIN
#endif
+30
View File
@@ -0,0 +1,30 @@
// clang-format off
// upload_speed 921600
// board esp32-poe-iso
#ifndef _OLIMEXPOEISO_H
#define _OLIMEXPOEISO_H
#include <stdint.h>
// enable only if you want to store a local paxcount table on the device
//#define HAS_SDCARD 2 // this board has a SDMMC card-reader/writer
// enable only if you want to send paxcount via ethernet port to mqtt server
#define HAS_MQTT 1 // use MQTT on ethernet interface
//#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery measurement
//#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 470k/470k on board
#define BAT_MEASURE_ADC ADC1_GPIO39_CHANNEL // external power sense
#define BAT_VOLTAGE_DIVIDER 2.1277f // voltage divider 47k/100k on board
#define HAS_BUTTON KEY_BUILTIN // on board button
#define HAS_LED NOT_A_PIN // no on board LED
//#define HAS_DISPLAY 1
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
//#define MY_DISPLAY_SDA SDA
//#define MY_DISPLAY_SCL SCL
//#define MY_DISPLAY_RST NOT_A_PIN
#endif
+24
View File
@@ -0,0 +1,24 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _TINYPICO_H
#define _TINYPICO_H
#include <stdint.h>
// Hardware related definitions for crowdsupply tinypico board
#define HAS_LED NOT_A_PIN // Green LED on board
#define HAS_RGB_LED FastLED.addLeds<APA102, GPIO_NUM_2, GPIO_NUM_12, BGR>(leds, RGB_LED_COUNT)
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2.7625f // voltage divider 160k/442k on board
#define BOARD_HAS_PSRAM // use extra 4MB external RAM
#define LED_POWER_SW (13) // switches LED power
#define LED_POWER_ON 0 // switch on transistor for LED power
#define LED_POWER_OFF 1
#endif
+46
View File
@@ -0,0 +1,46 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _TINYPICO_H
#define _TINYPICO_H
#include <stdint.h>
// Hardware related definitions for crowdsupply tinypico board
// for operating a 96x16 shift register LED matrix display
#define HAS_LED NOT_A_PIN // Green LED on board
#define HAS_RGB_LED FastLED.addLeds<APA102, GPIO_NUM_2, GPIO_NUM_12, BGR>(leds, RGB_LED_COUNT)
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2.7625f // voltage divider 160k/442k on board
#define BOARD_HAS_PSRAM // use extra 4MB external RAM
#define LED_POWER_SW (13) // switches LED power
#define LED_POWER_ON 0 // switch on transistor for LED power
#define LED_POWER_OFF 1
// LED Matrix display settings
#define HAS_MATRIX_DISPLAY 1 // Uncomment to enable LED matrix display output
#define LED_MATRIX_WIDTH (32*2) // Width (cols) in pixels (LEDs) of your display, must be 32X
#define LED_MATRIX_HEIGHT (16*1) // Height (rows) in pixels (LEDs) of your display, must be 16X
// Explanation of pin signals see https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/new-wiring
#define MATRIX_DISPLAY_SCAN_US 500 // Matrix display scan rate in microseconds (1ms is about 'acceptable')
#define LED_MATRIX_LATCHPIN 32 // LAT (or STB = Strobe)
#define LED_MATRIX_CLOCKPIN 33 // CLK
#define LED_MATRIX_EN_74138 21 // EN (or OE)
#define LED_MATRIX_LA_74138 23 // LA (or A)
#define LED_MATRIX_LB_74138 19 // LB (or B)
#define LED_MATRIX_LC_74138 18 // LC (or C)
#define LED_MATRIX_LD_74138 5 // LD (or D)
#define LED_MATRIX_DATA_R1 22 // R1 (or R0)
// CLK: The clock signal moves the data bits from pin R1 ("red") in the shift registers
// LAT: The latch signal enables LEDs according to the shift register's contents
// Line Selects: LA, LB, LC, LD select which rows of the display are currently lit (0 .. 15)
// OE: Output enable switches the LEDs on/off while transitioning from one row to the next
#endif
+44
View File
@@ -0,0 +1,44 @@
// clang-format off
// upload_speed 921600
// board ttgo-t-beam
#ifndef _TTGOBEAM_H
#define _TTGOBEAM_H
#include <stdint.h>
// Hardware related definitions for TTGO T-Beam board
// (only) for older T-Beam version T22_V05 eternal wiring LORA_IO1 to GPIO33 is needed!
//
// pinouts taken from http://tinymicros.com/wiki/TTGO_T-Beam
#define HAS_LED GPIO_NUM_14 // on board green LED, only new version TTGO-BEAM V07
//#define HAS_LED GPIO_NUM_21 // on board green LED, only old verison TTGO-BEAM V05
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_BUTTON GPIO_NUM_39 // on board button (next to reset)
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
// GPS settings
#define HAS_GPS 1 // use on board GPS
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M
//#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34
// enable only if device has these sensors, otherwise comment these lines
// BME680 sensor on I2C bus
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME680 SDA, SCL
//#define BME680_ADDR BME68X_I2C_ADDR_LOW // !! connect SDIO of BME680 to GND !!
// display (if connected)
//#define HAS_DISPLAY 1
#define MY_DISPLAY_SDA SDA
#define MY_DISPLAY_SCL SCL
#define MY_DISPLAY_RST NOT_A_PIN
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#endif
+80
View File
@@ -0,0 +1,80 @@
// clang-format off
// upload_speed 921600
// board ttgo-t-beam
#ifndef _TTGOBEAM_H
#define _TTGOBEAM_H
#include <stdint.h>
/*
Hardware related definitions for TTGO T-Beam board
for T-Beam version T22_V10 + T22_V11
pinouts taken from https://github.com/lewisxhe/TTGO-T-Beam
/// Button functions: ///
Power, short press -> set device on / while device is on: goto sleep
Power, long press -> set device off
User, short press -> flip display page
User, long press -> send a button message
Reset -> reset device
*/
#define HAS_DISPLAY 1
#define MY_DISPLAY_SDA SDA
#define MY_DISPLAY_SCL SCL
#define MY_DISPLAY_RST NOT_A_PIN
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_BUTTON GPIO_NUM_38 // middle on board button
#define HAS_LED GPIO_NUM_4 // not present on all T-Beam 1.0 boards
#define LED_ACTIVE_LOW 1
// power management settings
#define HAS_PMU 1 // has AXP192 chip
#define XPOWERS_CHIP_AXP192 1
#define PMU_INT GPIO_NUM_35 // battery interrupt
#define PMU_CHG_CURRENT XPOWERS_AXP192_CHG_CUR_1000MA // battery charge current
// possible values (mA):
// 100/190/280/360/450/550/630/700/780/880/960/1000/1080/1160/1240/1320
#define PMU_CHG_CUTOFF XPOWERS_AXP192_CHG_VOL_4V2 // battery charge cutoff
// possible values (V):
// 4V1/4V15/4V2/4V36
// GPS settings
#define HAS_GPS 1 // use on board GPS
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_34, GPIO_NUM_12 // UBlox NEO 6M
#define GPS_INT GPIO_NUM_37 // 30ns accurary timepulse generated by NEO 6M Pin #3
// enable only if device has these sensors, otherwise comment these lines
// BME680 sensor on I2C bus
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME680 SDA, SCL
//#define BME680_ADDR BME68X_I2C_ADDR_LOW // !! connect SDIO of BME680 to GND !!
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#endif
/*
// T-Beam V10/V11 has on board power management by AXP192 PMU chip:
//
// DCDC1 0.7-3.5V @ 1200mA -> OLED
// DCDC3 0.7-3.5V @ 700mA -> ESP32 (keep this on!)
// LDO1 30mA -> GPS Backup
// LDO2 200mA -> LORA
// LDO3 200mA -> GPS
// Wiring for I2C OLED display:
//
// Signal Header OLED
// 3V3 7 VCC
// GND 8 GND
// IO22(SCL) 9 SCL
// IO21(SDA) 10 SDA
//
*/
+48
View File
@@ -0,0 +1,48 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _TTGOFOX_H
#define _TTGOFOX_H
#include <stdint.h>
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_DISPLAY 1
#define HAS_LED NOT_A_PIN // green on board LED is useless, is GPIO25, which switches power for Lora+Display
#define EXT_POWER_SW GPIO_NUM_25 // switches power for LoRa chip
#define EXT_POWER_ON 0
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
#define HAS_BUTTON GPIO_NUM_36 // on board button (next to reset)
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA (21)
#define MY_DISPLAY_SCL (22)
#define MY_DISPLAY_RST NOT_A_PIN
// Settings for on board DS3231 RTC chip
#define HAS_RTC MY_DISPLAY_SDA, MY_DISPLAY_SCL // SDA, SCL
#define RTC_INT GPIO_NUM_34 // timepulse with accuracy +/- 2*e-6 [microseconds] = 0,1728sec / day
// Settings for IF482 interface
#define HAS_IF482 9600, SERIAL_7E1, GPIO_NUM_12, GPIO_NUM_14 // IF482 serial port parameters
// Settings for DCF77 interface
//#define HAS_DCF77 GPIO_NUM_14
//#define DCF77_ACTIVE_LOW 1
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (23)
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 (32)
#endif
+26
View File
@@ -0,0 +1,26 @@
// clang-format off
// upload_speed 1500000
// board esp32dev
#ifndef _TTGOTDISPLAY_H
#define _TTGOTDISPLAY_H
#include <stdint.h>
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_LED NOT_A_PIN // no on board LED (?)
#define HAS_BUTTON (35) // on board button A
// power management settings
#define BAT_MEASURE_ADC ADC1_GPIO34_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_6
#define BAT_VOLTAGE_DIVIDER 2.605f // voltage divider
// Display Settings
#define HAS_DISPLAY 2 // TFT-LCD
#define TFT_TYPE DISPLAY_T_DISPLAY
#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define MY_DISPLAY_WIDTH 135
#define MY_DISPLAY_HEIGHT 240
#endif
+24
View File
@@ -0,0 +1,24 @@
// clang-format off
// upload_speed 1500000
// board esp32-s3-devkitc-1
#ifndef _TTGOTDISPLAYS3_H
#define _TTGOTDISPLAYS3_H
#include <stdint.h>
#define HAS_LED NOT_A_PIN
#define HAS_BUTTON 14 // on board button (right side)
// power management settings
//#define BAT_MEASURE_ADC ADC1_GPIO4_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_6
//#define BAT_VOLTAGE_DIVIDER 2.605f // voltage divider
// Display Settings
#define HAS_DISPLAY 2 // TFT-LCD parallel
#define TFT_TYPE DISPLAY_T_DISPLAY_S3
#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define MY_DISPLAY_WIDTH 172
#define MY_DISPLAY_HEIGHT 320
#endif
+27
View File
@@ -0,0 +1,27 @@
// clang-format off
// upload_speed 1500000
// board esp32-s3-devkitc-1
// for pinouts see https://github.com/Xinyuan-LilyGO/T-Dongle-S3
#ifndef _TTGOTDONGLEDISPLAYS3_H
#define _TTGOTDONGLEDISPLAYS3_H
#include <stdint.h>
#define HAS_LED NOT_A_PIN
#define RGB_LED_COUNT 1
#define HAS_RGB_LED FastLED.addLeds<APA102, 40, 39, BGR>(leds, RGB_LED_COUNT)
#define FASTLED_INTERNAL
#define HAS_BUTTON 0 // dongle button is on GPIO0
#define HAS_SDCARD 2 // dongle has a SD MMC card-reader/writer
#define SDCARD_SLOTWIDTH 4 // dongle has 4 line interface
#define SDCARD_SLOTCONFIG { .clk = GPIO_NUM_12, .cmd = GPIO_NUM_16, .d0 = GPIO_NUM_14, .d1 = GPIO_NUM_17, .d2 = GPIO_NUM_21, .d3 = GPIO_NUM_18, .cd = SDMMC_SLOT_NO_CD, .wp = SDMMC_SLOT_NO_WP, .width = 4, .flags = 0, }
#define HAS_DISPLAY 3 // TFT-LCD
#define TFT_TYPE DISPLAY_T_DONGLE_S3
#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define MY_DISPLAY_WIDTH 80
#define MY_DISPLAY_HEIGHT 160
#endif
+21
View File
@@ -0,0 +1,21 @@
// clang-format off
// upload_speed 1500000
// board esp32-s3-devkitc-1
// for pinouts see https://github.com/Xinyuan-LilyGO/T-Dongle-S3
#ifndef _TTGOTDONGLES3_H
#define _TTGOTDONGLES3_H
#include <stdint.h>
#define HAS_LED NOT_A_PIN
#define RGB_LED_COUNT 1
#define HAS_RGB_LED FastLED.addLeds<APA102, 40, 39, BGR>(leds, RGB_LED_COUNT)
#define FASTLED_INTERNAL
#define HAS_BUTTON 0 // dongle button is on GPIO0
#define HAS_SDCARD 2 // dongle has a SD MMC card-reader/writer
#define SDCARD_SLOTWIDTH 4 // dongle has 4 line interface
#define SDCARD_SLOTCONFIG { .clk = GPIO_NUM_12, .cmd = GPIO_NUM_16, .d0 = GPIO_NUM_14, .d1 = GPIO_NUM_17, .d2 = GPIO_NUM_21, .d3 = GPIO_NUM_18, .cd = SDMMC_SLOT_NO_CD, .wp = SDMMC_SLOT_NO_WP, .width = 4, .flags = 0, }
#endif
+35
View File
@@ -0,0 +1,35 @@
// clang-format off
// upload_speed 1500000
// board pico32
#ifndef _TTGOTWRISTBAND_H
#define _TTGOTWRISTBAND_H
#include <stdint.h>
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_LED NOT_A_PIN // no on board LED (?)
#define HAS_BUTTON (33) // on board button A
// power management settings
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2.605f // voltage divider
// Display Settings
#define HAS_DISPLAY 2 // TFT-LCD
#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define MY_DISPLAY_WIDTH 80
#define MY_DISPLAY_HEIGHT 160
#define TFT_MOSI GPIO_NUM_19 // SPI
#define TFT_MISO NOT_A_PIN // SPI
#define TFT_SCLK GPIO_NUM_18 // SPI
#define TFT_CS GPIO_NUM_5 // Chip select control
#define TFT_DC GPIO_NUM_23 // Data Command control
#define TFT_RST GPIO_NUM_26 // Reset
#define TFT_BL GPIO_NUM_27 // LED back-light
#define TFT_FREQUENCY 27000000
#define TFT_TYPE LCD_ST7735S, FLAGS_NONE, TFT_FREQUENCY, TFT_CS, TFT_DC, TFT_RST, TFT_BL, TFT_MISO, TFT_MOSI, TFT_SCLK
#endif
+42
View File
@@ -0,0 +1,42 @@
// clang-format off
// upload_speed 115200
// board ttgo-lora32-v1
#ifndef _TTGOV1_H
#define _TTGOV1_H
#include <stdint.h>
// Hardware related definitions for TTGOv1 board
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1
#define HAS_DISPLAY 1 // OLED-Display on board
//#define MY_DISPLAY_FLIP 1 // uncomment this for rotated display
#define HAS_LED LED_BUILTIN // set to NOT_A_PIN to disable
#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
#define HAS_BUTTON KEY_BUILTIN
// enable only if you want to store a local paxcount table on the device
// #define HAS_SDCARD 1 // this board has an SD-card-reader/writer
// Pins for SD-card
#define SDCARD_CS (13)
#define SDCARD_MOSI (15)
#define SDCARD_MISO (2)
#define SDCARD_SCLK (14)
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA (4)
#define MY_DISPLAY_SCL (15)
#define MY_DISPLAY_RST (16)
// This board reports back the wrong I2C address, so we overwrite it here
#define MY_DISPLAY_ADDR 0x3C
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_IO1 (33)
#define LORA_IO2 (32) // ref.: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
#endif
+44
View File
@@ -0,0 +1,44 @@
// clang-format off
// upload_speed 921600
// board ttgo-lora32-v2
// https://github.com/LilyGO/TTGO-LORA32
#ifndef _TTGOV2_H
#define _TTGOV2_H
#include <stdint.h>
// Hardware related definitions for LilyGO TTGO LORA32 V2 Board
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_DISPLAY 1
//#define MY_DISPLAY_FLIP 1 // uncomment this for rotated display
#define HAS_LED NOT_A_PIN // on-board LED is wired to SCL (used by display) therefore totally useless
// disable brownout detection (needed on TTGOv2 for battery powered operation)
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
// enable only if you want to store a local paxcount table on the device
#define HAS_SDCARD 1 // this board has an SD-card-reader/writer
// Pins for SD-card
#define SDCARD_CS (13)
#define SDCARD_MOSI (15)
#define SDCARD_MISO (2)
#define SDCARD_SCLK (14)
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA (21)
#define MY_DISPLAY_SCL (22)
#define MY_DISPLAY_RST NOT_A_PIN
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
// ********************************************************************************************
//! LORA_IO1 is not connected on LilyGO TTGO V2 - bodge wire from LORA_IO1 to GPIO33 necessary
#define LORA_IO1 (33)
// ********************************************************************************************
#define LORA_IO2 LMIC_UNUSED_PIN
#endif
+44
View File
@@ -0,0 +1,44 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _TTGOV21NEW_H
#define _TTGOV21NEW_H
#include <stdint.h>
/* Hardware related definitions for TTGO V2.1 Board
// ATTENTION: check your board version!
// This settings are for boards labeled v1.6 or v1.6.1 on pcb, NOT for v1.5 or older
*/
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
// enable only if you want to store a local paxcount table on the device
#define HAS_SDCARD 2 // this board has a SD MMC card-reader/writer
#define SDCARD_SLOTWIDTH 4 // 4-line interface
#define HAS_DISPLAY 1
#define HAS_LED (25) // green on board LED
//#define HAS_LED NOT_A_PIN
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA (21)
#define MY_DISPLAY_SCL (22)
#define MY_DISPLAY_RST NOT_A_PIN
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (23)
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 (32)
#endif
+51
View File
@@ -0,0 +1,51 @@
// clang-format off
// upload_speed 921600
// board esp32dev
#ifndef _TTGOV21OLD_H
#define _TTGOV21OLD_H
#include <stdint.h>
/* Hardware related definitions for TTGO V2.1 Board
// ATTENTION: check your board version!
// This settings are for boards without label on pcb, or labeled v1.5 on pcb
// see https://github.com/manuelbl/ttn-esp32/wiki/Boards-and-Pins
*/
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_LED NOT_A_PIN // no usable LED on board
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
// enable only if you want to store a local paxcount table on the device
#define HAS_SDCARD 1 // this board has an SD-card-reader/writer
// Pins for SD-card
#define SDCARD_CS (13)
#define SDCARD_MOSI (15)
#define SDCARD_MISO (2)
#define SDCARD_SCLK (14)
#define HAS_DISPLAY 1
#define MY_DISPLAY_FLIP 1 // rotated display
//#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
//#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
// Pins for I2C interface of OLED Display
#define MY_DISPLAY_SDA (21)
#define MY_DISPLAY_SCL (22)
#define MY_DISPLAY_RST NOT_A_PIN
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST LMIC_UNUSED_PIN
// #define LORA_RST (12) // v1.5 labelled with pcb date 20180523
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 (32)
#endif
+47
View File
@@ -0,0 +1,47 @@
// clang-format off
// upload_speed 921600
// board lolin32
#ifndef _WEMOS32MATRIX_H
#define _WEMOS32MATRIX_H
#include <stdint.h>
#define HAS_LED NOT_A_PIN // no LED
// LED Matrix display settings
#define HAS_MATRIX_DISPLAY 1 // Uncomment to enable LED matrix display output
#define LED_MATRIX_WIDTH (32*2) // Width (cols) in pixels (LEDs) of your display, must be 32X
#define LED_MATRIX_HEIGHT (16*1) // Height (rows) in pixels (LEDs) of your display, must be 16X
// Pin numbers work fine for Wemos Lolin32 board (all used pins are on 1 side of the board)
// Explanation of pin signals see https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/new-wiring
#define MATRIX_DISPLAY_SCAN_US 500 // Matrix display scan rate in microseconds (1ms is about 'acceptable')
#define LED_MATRIX_LATCHPIN 13 // LAT (or STB = Strobe)
#define LED_MATRIX_CLOCKPIN 32 // CLK
#define LED_MATRIX_EN_74138 12 // EN (or OE)
#define LED_MATRIX_LA_74138 14 // LA (or A)
#define LED_MATRIX_LB_74138 27 // LB (or B)
#define LED_MATRIX_LC_74138 25 // LC (or C)
#define LED_MATRIX_LD_74138 26 // LD (or D)
#define LED_MATRIX_DATA_R1 33 // R1 (or R0)
// CLK: The clock signal moves the data bits from pin R1 ("red") in the shift registers
// LAT: The latch signal enables LEDs according to the shift register's contents
// Line Selects: LA, LB, LC, LD select which rows of the display are currently lit (0 .. 15)
// OE: Output enable switches the LEDs on/off while transitioning from one row to the next
/*
How it works:
1. clock out 8 bytes for columns via R1 and CLK (8 * 8 bit -> 64 columns)
2. OE disable (LEDs off)
3. select line to lit with LA/LB/LC/LD hex coded (4 bit -> 16 rows)
4. latch data from shift registers to columns
5. OE enable (LEDs on)
6. repeat with step1 for next line
*/
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#endif
+20
View File
@@ -0,0 +1,20 @@
// clang-format off
// upload_speed 921600
// board lolin32
#ifndef _WEMOS32OLED_H
#define _WEMOS32OLED_H
#include <stdint.h>
#define HAS_LED NOT_A_PIN // no LED
#define HAS_DISPLAY 1
#define MY_DISPLAY_SDA (5)
#define MY_DISPLAY_SCL (4)
#define MY_DISPLAY_RST NOT_A_PIN
#define MY_DISPLAY_FLIP 1 // use if display is rotated
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#endif