Giter VIP home page Giter VIP logo

loranow's Introduction

LoRaNow

LoRaNow is a open source communication protocol to make easier to understand the concept of Node / Gateway communication using LoRa technology.

This library was design using the Arduino LoRa Library by Sandeep Mistry.

Features

  • Hardware Compatibility - Compatible with Arduino and ESP boards with a LoRa module attached.
  • Id - Each node has an identification, by default the library creates a unique id for the node.
  • Checksum - Each payload has a checksum to verify if the data is corrupted.
  • State Machine - The library has a state machine algorithm to manage the LoRa module, open an RX window after sending data and put the module to sleep.

Compatible Hardware

The main focus hardware is Arduino and ESP boards with RFM95W LoRa module.

RFM95W

The default pinout connection is like the table below.

RFM95W Arduino ESP8266 ESP32
VCC 3.3V 3.3V 3.3V
GND GND GND GND
SCK SCK SCK SCK
MISO MISO MISO MISO
MOSI MOSI MOSI MOSI
SS 10 gpio16 gpio18
DIO0 2 gpio15 gpio26

SS, and DIO0 pins can be changed by using LoRaNow.setPins(ss, dio0) or LoRaNow.setPinsSPI(sck, miso, mosi, ss, dio0). DIO0 pin is needed, it must be interrupt capable via attachInterrupt(...).

Ferquency

You can use this table to lookup the available frequencies by your country. The selectable frequency also depends on your hardware.

You can select the frequency using LoRaNow.setFrequency(frequency) or you can select the frequency by country.

  • LoRaNow.setFrequencyCN() - Select the frequency 486.5 MHz - Used in China
  • LoRaNow.setFrequencyEU() - Select the frequency 868.3 MHz - Used in Europe
  • LoRaNow.setFrequencyUS() - Select the frequency 904.1 MHz - Used in USA, Canada and South America
  • LoRaNow.setFrequencyAU() - Select the frequency 917.0 MHz - Used in Australia, Brazil and Chile

Protocol Payload

This is the payload format, this protocol don't have any kind of encryption.

Protocol Device ID Count Length CheckSum Payload
1 Byte 4 Bytes 1 Byte 1 Byte 1 Byte N Bytes

Installation

Examples

The library comes with examples. After installing the library you need to restart the Arduino IDE before they can be found under File > Examples > LoRaNow.

API

See API.md.

License

This library is licensed under the MIT Licence.

To do

  • Example for ESP8266 board
  • Example for ESP32 board
  • Improve documentation
  • State machine

See news and other projects on my blog

Do you like this library? Please star this project on GitHub!

loranow's People

Contributors

ricaun avatar agmuntianu avatar per1234 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.