Giter VIP home page Giter VIP logo

elixir_lora_gateway's Introduction

LoRa

Hex.pm

This is a module for transmitter data using LoRa Radios.

Available for Nerves Project with Semtech SX1276/77/78/79 based boards.

Getting started

Hardware

Example using Raspberry Pi and Adafruit RFM9xx Radio

Lora

Installation

The package can be installed in your Nerves Project by adding LoRa to your list of dependencies in mix.exs:

def deps do
  [
    {:lora, "~> 1.0"}
  ]
end

Configure SPI

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_pid} = LoRa.start_link([spi: "spidev0.1", rst: 27])

Configure Radio

iex> LoRa.begin(lora_pid, 433.0e6)
:ok
iex> LoRa.set_spreading_factor(lora_pid, 8)
:ok
iex> LoRa.set_bandwidth(lora_pid, 62.5e3)
:ok

Sending data

iex> LoRa.send(lora_pid, [value: 10])

Receiveing data

When the radio receives some data it sends a message to the process that started the link.

iex> flush()
{:lora,
 %{
   packet: "hello world",
   rssi: -90,
   snr: 6,
   time: ~U[2020-05-06 21:13:11.161125Z]
 }}
:ok

elixir_lora_gateway's People

Watchers

mike sharps avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.