This block initialises the LoRa Radio module ready for use, it sets up the library and sends the commands to the RAK811 to configure it for use with the LoRaWAN Network.
Currently the Makecode library only supports ABP Mode.
IoTLoRaNode.initialiseRadio(
"Dev Address",
"NWSK",
"AppKey",
spreadingFactors.Seven
)
You must fill out the Device Address, NWSK / Network Session Key & Application Session Key.you can find this from your LoRaWAN Provider. (Such as The Things Network).
These blocks add Data to the payload, the payload is a string variable which gets the correct byte values for the specified sensor with these blocks. Each block can specifiy the “channel” that it is on, this is so when the decoder decodes it the sensor is on the same “channel” each time. Each sensor should be on its own unique channel between one to nine.
This block can add a digital value of either true
or false
.
IoTLoRaNode.digitalValue(false, channels.One)
TTN will decode this value as a digital value of 1 or 0.
This block can add an analogue value from 0
to 254
.
IoTLoRaNode.analogueValue(0, channels.One)
TTN Will decode this value as an analogue in with the decoded value displayed.
This block will add an analogue value similar to the analogue value method. However once decoded will display in degrees C.
IoTLoRaNode.tempertureValue(0, channels.One)
TTN will decode this as a Degrees C value in the decoder.
Similar to the Analogue & Temperature Values. This formats it as a light level value.
IoTLoRaNode.lightValue(0, channels.One)
TTN will decode this as a light level value in the decoder.
This block is then used to transmit the payload, when run it will transmit the entire payload in the buffer.
IoTLoRaNode.loraTransmitPayload()
This package is designed to be used currently in LoRaWAN Mode only which means that your node has to be within range of a LoRaWAN Provider and for you to be signed up to that LoRaWAN Provider.
We officially support these two providers and can provide support for them:
This library is released under the GNU GPL V3 License, you can view the full license in the LICENSE file.
We aim to with the help of the community translate this package to a variety of languages.
Languages in bold have been translated and then checked by at least one person who speaks that language. Languages not in bold have been translated by us using translation software but requires checking. Languages in Italics are to be translated.
Tutorials: Maker Zone Micro:bit Page
Questions? Email us or ask in our Discord Server
Keywords: LoRa, LoRaWAN, The Things Network, Pi Supply