2018-07-15 23:08:52 +02:00
|
|
|
// Hardware related definitions for Pycom LoPy Board (NOT LoPy4)
|
2018-03-18 19:45:17 +01:00
|
|
|
|
2018-08-11 19:12:04 +02:00
|
|
|
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
|
|
|
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
2018-03-18 19:45:17 +01:00
|
|
|
#define CFG_sx1272_radio 1
|
2018-07-15 23:08:52 +02:00
|
|
|
#define HAS_LED NOT_A_PIN // LoPy has no on board LED, so we use RGB LED on LoPy
|
2018-06-10 21:46:58 +02:00
|
|
|
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0
|
2018-03-18 19:45:17 +01:00
|
|
|
|
|
|
|
// Hardware pin definitions for Pycom LoPy board
|
2018-06-10 21:46:58 +02:00
|
|
|
#define PIN_SPI_SS GPIO_NUM_17
|
|
|
|
#define PIN_SPI_MOSI GPIO_NUM_27
|
|
|
|
#define PIN_SPI_MISO GPIO_NUM_19
|
|
|
|
#define PIN_SPI_SCK GPIO_NUM_5
|
|
|
|
#define RST GPIO_NUM_18
|
|
|
|
#define DIO0 GPIO_NUM_23 // LoRa IRQ
|
2018-07-14 11:44:50 +02:00
|
|
|
#define DIO1 GPIO_NUM_23 // Pin tied via diode to DIO0
|
|
|
|
#define DIO2 GPIO_NUM_23 // Pin tied via diode to DIO0
|
2018-03-18 19:45:17 +01:00
|
|
|
|
|
|
|
// select WIFI antenna (internal = onboard / external = u.fl socket)
|
2018-06-10 21:46:58 +02:00
|
|
|
#define HAS_ANTENNA_SWITCH 16 // pin for switching wifi antenna
|
|
|
|
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
2018-06-24 11:17:55 +02:00
|
|
|
|
|
|
|
// uncomment this only if your LoPy runs on a Pytrack expansion board with GPS
|
2018-09-20 17:33:52 +02:00
|
|
|
#define HAS_GPS 1
|
|
|
|
#define GPS_QUECTEL_L76 GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
|
|
|
|
#define GPS_ADDR 0x10
|
2018-06-24 11:17:55 +02:00
|
|
|
|
|
|
|
// uncomment this only if your LoPy runs on a expansion board 3.0
|
|
|
|
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
|
|
|
//#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm on board
|
|
|
|
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
|
|
|
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
|
|
|
|
|
|
|
// uncomment this only if your LoPy runs on a expansion board 2.0
|
|
|
|
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
|
|
|
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm on board
|
|
|
|
//#define HAS_BUTTON GPIO_NUM_13 // (P10)
|
|
|
|
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|