LoRa and esp8266 gateway?

Will esp32 code work in esp8266?

esp8266+rfm95w

Thanks

Need an if in SPI.begin

if esp32 …
if esp8266 …

Proof Concept

Gateway:

Node:

MQTT:

2 Likes

esp07s_env.ini

[platformio]

default_envs = easyhan-esp07s

[env:easyhan-esp07s]

platform = ${com.esp8266_platform}
board = esp07s

lib_deps =
  ${com-esp.lib_deps}
  ${libraries.wifimanager8266}
  ${libraries.lora}

build_flags =
  ${com-esp.build_flags}
  '-DZgatewayLORA="LORA"'
  '-DLORA_BAND=868E6'
  '-DLORA_SCK=14'
  '-DLORA_MISO=12'
  '-DLORA_MOSI=13'
  '-DLORA_SS=15'
  '-DLORA_RST=16'
  '-DLORA_DI0=5'
  '-DGateway_Name="OMG_ESP07S_LORA"'
  '-DZmqttDiscovery="HADiscovery"'

board_build.flash_mode = dout
custom_description = LoRa 868Mhz ESP07S Gateway
custom_hardware = Easy HAN LoRa

; EOF

ZgatewayLoRA tweak

void setupLORA() {
  SPI.begin();