From 558ef44a6e01da59d0f4d7754aafd5c6e13ed5c7 Mon Sep 17 00:00:00 2001 From: gijsio <67470426+gijsio@users.noreply.github.com> Date: Fri, 15 Jan 2021 11:35:00 +0100 Subject: [PATCH] additional description --- content/tutorials/networks/lora/nvram.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/tutorials/networks/lora/nvram.md b/content/tutorials/networks/lora/nvram.md index 25ebb55..c5effaa 100644 --- a/content/tutorials/networks/lora/nvram.md +++ b/content/tutorials/networks/lora/nvram.md @@ -1,12 +1,12 @@ --- -title: "non-volatile RAM" +title: "LoRa NVRAM" aliases: - tutorials/lora/nvram.html - tutorials/lora/nvram.md - chapter/tutorials/lora/nvram --- -See the example below on how to use the lora nvram methods: +See the example below on how to use the lora nvram methods. You can use this to for example send a packet of sensor data over LoRa, and then enter deepsleep to save power. It is also possible to use OTAA instead of ABP by changing the activation method and authentication parameters. Note that the non volatile LoRa storage will be erased after it is restored, meaning you will have to save it again before sleeping, _and_ it is not possible to restore the values twice without saving in between. ```python import machine @@ -15,7 +15,7 @@ from network import LoRa import socket import ubinascii -sleep_time = 1000 +sleep_time = 10000 # sleep for 10 seconds print("init LoRa") lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868) time.sleep(1) #Allows us to exit the code using ctrl+c @@ -52,4 +52,5 @@ print("received: {}".format(data)) print("sleeping for {} ms".format(sleep_time)) machine.deepsleep(sleep_time) +print("this will never get printed") ```