diff --git a/platformio.ini b/platformio.ini index 058aeb3..c81915e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -30,6 +30,17 @@ platform = espressif32 board = lolin32 framework = arduino build_flags = -D ENVIRONMENT=2 +lib_deps = + ericksimoes/Ultrasonic@^3.0.0 + 256dpi/MQTT@^2.4.8 + http://192.168.2.3/Bonobo.Git.Server/OLEDDisplay.git +monitor_speed = 115200 + +[env:ttgo-t18] +platform = espressif32 +board = ttgo-t1 +framework = arduino +build_flags = -D ENVIRONMENT=3 lib_deps = ericksimoes/Ultrasonic@^3.0.0 256dpi/MQTT@^2.4.8 diff --git a/src/hal.h b/src/hal.h index 1a84868..936edb1 100644 --- a/src/hal.h +++ b/src/hal.h @@ -12,7 +12,9 @@ #define HELTECv2 1 #define LOLIN32 2 -#define HELTECv21 3 +#define TTGO_T18 3 +#define HELTECv21 4 + #if ENVIRONMENT == HELTECv2 //HELTEC WIFI LORA V2 @@ -48,4 +50,17 @@ #endif +#if ENVIRONMENT == TTGO_T18 //LOLIN32 + +#define SDA_OLED 15 +#define SCL_OLED 4 +#define RST_OLED 17 + +#define TRIGGER 13 +#define ECHO 14 + +#define VBATT ADC2_CHANNEL_1 +#define VEXT 21 +#endif + #endif //HALH \ No newline at end of file