Package adds support LoRa
Enter to Maker MakeCode
1.- Select "New Project"
2.- Select MKR1300 Arduino board
3.- Go menu -> Advanced -> Extensions and copy the next link
https://github.com/ElectronicCats/pxt-lora
press enter select packages in menu
The package adds support LoRa for Arduino MKR1300.
An library for sending and receiving data using LoRa radios.
Install arduino-lora library in arduino, and upload firmware to arduino mkr1300 for receiver data https://github.com/sandeepmistry/arduino-LoRa/blob/master/examples/LoRaReceiver/LoRaReceiver.ino
Open monitor serial and wait data
Write Packet to send. Each packet can contain up to 255 bytes.
lora.send("Hello")
Read Version of chip.
let version = lora.readVersion()
Returns number of bytes available for reading.
let data = 0
forever(function () {
if (lora.available() < 0) {
data = lora.read()
}
})
Read the next byte from the packet.
let data = lora.read()
Returns the RSSI of the received packet.
rssi = lora.packetRssi()
Check if a packet has been received.
rssi = lora.parsePacket(0)
The following pins are used for LoRa:
PA15
- LORA SPI - MOSIPA12
- LORA SPI - MISOPA13
- LORA SPI - SCKPA14
- LORA SPI - CSPB09
- LORA SPI - BOOTPA27
- LORA SPI - RSTMIT
package lora