2018-12-28 20:31:38 +01:00
|
|
|
// clang-format off
|
2019-06-30 17:48:24 +02:00
|
|
|
// upload_speed 921600
|
|
|
|
// board lopy4
|
2018-12-28 20:31:38 +01:00
|
|
|
|
|
|
|
#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
|
2019-02-17 19:21:37 +01:00
|
|
|
#define LORA_RST LMIC_UNUSED_PIN // reset pin of lora chip is not wired von LoPy4
|
2018-12-28 20:31:38 +01:00
|
|
|
|
|
|
|
//#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
|
2019-08-14 21:52:12 +02:00
|
|
|
#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
|
2020-03-21 08:38:42 +01:00
|
|
|
#define RGB_LED_COUNT 1 // we have 1 LEDs
|
|
|
|
#define HAS_RGB_LED SmartLed rgb_led(LED_WS2812, RGB_LED_COUNT, GPIO_NUM_0) // WS2812B RGB LED on GPIO0 (P2)
|
2018-12-28 20:31:38 +01:00
|
|
|
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM
|
|
|
|
|
2018-12-28 21:04:11 +01:00
|
|
|
// Note: Pins for LORA chip SPI interface come from board file pins_arduino.h
|
2018-12-28 20:31:38 +01:00
|
|
|
|
|
|
|
// 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 this only if your LoPy runs on a PYTRACK BOARD
|
|
|
|
//#define HAS_GPS 1
|
|
|
|
//#define GPS_I2C GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
|
|
|
|
//#define GPS_ADDR 0x10
|
|
|
|
|
|
|
|
// 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
|
2019-03-23 11:02:47 +01:00
|
|
|
#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
|
2018-12-28 20:31:38 +01:00
|
|
|
|
2018-10-21 19:00:20 +02:00
|
|
|
#endif
|