# available at https://www.pycom.io/opensource/licensing # """ LoPy LoRaWAN Nano Gateway example usage """ import config import time from nanogateway import NanoGateway from machine import WDT if __name__ == '__main__': nanogw = NanoGateway(id=config.GATEWAY_ID, frequency=config.LORA_FREQUENCY, datarate=config.LORA_GW_DR, ssid=config.WIFI_SSID, password=config.WIFI_PASS, server=config.SERVER, port=config.PORT, ntp_server=config.NTP, ntp_period=config.NTP_PERIOD_S) nanogw.start() nanogw._log('You may now press ENTER to enter the REPL') wdt = WDT(timeout=15000) while True: #print("feeding wdt") wdt.feed() time.sleep(5) #input()
from nanogateway import NanoGateway if __name__ == '__main__': # Gateway configuration. Change as you need. GW = NanoGateway(wifi_ssid='My Awesome Network', wifi_password='******') GW.start() GW.log('You may now press ENTER to open a REPL.') input()
"""LoPy LoRaWAN Nano Gateway""" from nanogateway import NanoGateway import config gateway = NanoGateway(id=config.GATEWAY_ID, frequency=config.LORA_FREQUENCY, datarate=config.LORA_DR, ssid=config.WIFI_SSID, password=config.WIFI_PASS, server=config.SERVER, port=config.PORT, ntp=config.NTP, ntp_period=config.NTP_PERIOD_S) gateway.start()
""" LoPy LoRaWAN Nano Gateway example usage """ import config from nanogateway import NanoGateway nanogw = NanoGateway(id=config.GATEWAY_ID, frequency=config.LORA_FREQUENCY, datarate=config.LORA_DR, ssid=config.WIFI_SSID, password=config.WIFI_PASS, server=config.SERVER, port=config.PORT, ntp=config.NTP, ntp_period=config.NTP_PERIOD_S) nanogw.start()