1 Star 0 Fork 0

huawangl / arduino-LoRa

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Arduino LoRa

Build Status

An Arduino library for sending and receiving data using LoRa radios.

Compatible Hardware

Semtech SX1276/77/78/79 wiring

Semtech SX1276/77/78/79 Arduino
VCC 3.3V
GND GND
SCK SCK
MISO MISO
MOSI MOSI
NSS 10
NRESET 9
DIO0 2

NSS, NRESET, and DIO0 pins can be changed by using LoRa.setPins(ss, reset, dio0). DIO0 pin is optional, it is only needed for receive callback mode. If DIO0 pin is used, it must be interrupt capable via attachInterrupt(...).

NOTES:

  • Some boards (like the Arduino Nano), cannot supply enough current for the SX127x in TX mode. This will cause lockups when sending, be sure to use an external 3.3V supply that can provide at least 120mA's when using these boards.
  • If your Arduino board operates at 5V, like the Arduino Uno, Leonardo or Mega, you will need to use a level converter for the wiring to the Semtech SX127x module. Most Semtech SX127x breakout boards do not have logic level converters built-in.

Installation

Using the Arduino IDE Library Manager

  1. Choose Sketch -> Include Library -> Manage Libraries...
  2. Type LoRa into the search box.
  3. Click the row to select the library.
  4. Click the Install button to install the library.

Using Git

cd ~/Documents/Arduino/libraries/
git clone https://github.com/sandeepmistry/arduino-LoRa LoRa

API

See API.md.

Examples

See examples folder.

FAQ

1) Initilizating the LoRa radio is failing

Please check the wiring you are using matches what's listed in Semtech SX1276/77/78/79 wiring. You can also use LoRa.setPins(ss, reset, dio0) to change the default pins used. Some logic level converters cannot operate at 8 MHz, you can call LoRa.setSPIFrequency(frequency) to lower the SPI frequency used by the library. Both API's must be called before LoRa.begin(...).

2) Can other radios see the packets I'm sending?

Yes, any LoRa radio that are configured with the same radio parameters and in range can see the packets you send.

3) Is the data I'm sending encrypted?

No, all data is sent unencrypted. If want your packet data to be encrypted, you must encrypt it before passing it into this library, followed by decrypting on the receiving end.

4) How does this library differ from LoRaWAN libraries?

This library exposes the LoRa radio directly, and allows you to send data to any radios in range with same radio parameters. All data is broadcasted and there is no addressing. LoRaWAN builds on top of LoRA, but adds addressing, encryption, and additional layers. It also requires a LoRaWAN gateway and LoRaWAN network and application server.

5) Does this library honor duty cycles?

No, you have to manage it by your self.

6) Which frequencies can I use?

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

Please also notice the frequency dependent duty cycles for legal reasons!

License

This libary is licensed under the MIT Licence.

MIT License Copyright (c) 2016 Sandeep Mistry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

An Arduino library for sending and receiving data using LoRa radios. 展开 收起
C++
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/huawangl/arduino-LoRa.git
git@gitee.com:huawangl/arduino-LoRa.git
huawangl
arduino-LoRa
arduino-LoRa
master

搜索帮助