From 7f5c936061061bde1c0bb3b65799d8f7a976ed20 Mon Sep 17 00:00:00 2001 From: Florian Ludwig Date: Mon, 14 May 2018 18:14:59 +0200 Subject: [PATCH] add FiPy environment --- platformio.ini | 13 +++++++++++++ src/hal/fipy.h | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/hal/fipy.h diff --git a/platformio.ini b/platformio.ini index f780a017..8efbc391 100644 --- a/platformio.ini +++ b/platformio.ini @@ -79,6 +79,19 @@ build_flags = -Dttgov2 -include "src/hal/ttgov2.h" +[env:fipy] +platform = espressif32 +framework = arduino +board = esp32dev +monitor_baud = 115200 +upload_speed = 921600 +lib_deps = + ${common_env_data.lib_deps_rgbled} +build_flags = + ${common_env_data.build_flags} + -Dlopy + -include "src/hal/fipy.h" + [env:lopy] platform = espressif32 framework = arduino diff --git a/src/hal/fipy.h b/src/hal/fipy.h new file mode 100644 index 00000000..31aa55f6 --- /dev/null +++ b/src/hal/fipy.h @@ -0,0 +1,19 @@ +// Hardware related definitions for Pycom LoPy Board (not: LoPy4) + +#define CFG_sx1272_radio 1 +#define HAS_LED NOT_A_PIN // LoPy4 has no on board LED, so we use RGB LED on LoPy4 +#define HAS_RGB_LED 0 // WS2812B RGB LED on GPIO0 + +// Hardware pin definitions for Pycom LoPy4 board +#define PIN_SPI_SS 18 +#define PIN_SPI_MOSI 27 +#define PIN_SPI_MISO 19 +#define PIN_SPI_SCK 5 +#define RST LMIC_UNUSED_PIN +#define DIO0 23 // LoRa IRQ +#define DIO1 23 // workaround +#define DIO2 LMIC_UNUSED_PIN + +// select WIFI antenna (internal = onboard / external = u.fl socket) +#define HAS_ANTENNA_SWITCH 21 // pin for switching wifi antenna +#define WIFI_ANTENNA 0 // 0 = internal, 1 = external