LoRa v1.0.1 LoRa View Source
This is a module for transmitter data using LoRa Radios.
Radios:
Semtech SX1276/77/78/79 based boards.
Link to this section Summary
Functions
Awake the LoRa Radio.
Initialize the LoRa Radio and set your frequency work.
Returns a specification to start this module under a supervisor.
Remove the verify digit.
This is a verify digit add in the data message.
Callback implementation for GenServer.init/1
.
Send data for other radios.
Set Trasmission Signal Bandwidth.
Set Spreading Factor. sf
is a value between 6 and 12. Standar value is 6.
Set the LoRa Radio in sleep mode.
Start and link a new GenServer for LoRa radio.
Link to this section Functions
Awake the LoRa Radio.
LoRa.awake(lora_pid)
Initialize the LoRa Radio and set your frequency work.
{:ok, lora} = LoRa.start_link()
LoRa.begin(lora, 433.0e6)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Remove the verify digit.
LoRa.disable_crc(lora_pid)
This is a verify digit add in the data message.
LoRa.enable_crc(lora_pid)
Callback implementation for GenServer.init/1
.
Send data for other radios.
LoRa.send(lora_pid, 'hello world')
LoRa.send(lora_pid, "hello world")
LoRa.send(lora_pid, %{value: 10})
Set Trasmission Signal Bandwidth.
LoRa.set_signal_bandwidth(lora_pid, 31.25e3)
Set Spreading Factor. sf
is a value between 6 and 12. Standar value is 6.
LoRa.set_spreading_factor(lora_pid, 10)
Set the LoRa Radio in sleep mode.
LoRa.sleep(lora_pid)
Start and link a new GenServer for LoRa radio.
Can be set the parameters of SPI and GPIO pin for the reset of radio.
# standard values: spi: "spidev0.0", spi_speed: 8_000_000, rst: 25
{:ok, lora} = LoRa.start_link()
or
{:ok, lora} = LoRa.start_link([spi: "spidev0.1", spi_speed: 5_000_000, rst: 27])