---
# System prepended metadata

title: lora(raspberry pi)
tags: [raspberry pi, lora]

---

# lora(raspberry pi)

硬體:
1. raspberry pi zero
2. ra-02

目的: 使用raspberry pi zeor 搭配 

接線圖:

![](https://i.imgur.com/uXisbZ0.jpg)


3V3-3.3V
Gnd-Gnd
NSS-GPIO8
DIO0-GPIO22
SCK-GPIO11
MISO-GPIO9
MOSI-GPIO10


軟體操作:

**接收端:**
在raspberry pi zero作為接收端輸入以下指令:
```bash=
1. git clone https://github.com/mayeranalytics/pySX127x
2. git clone https://github.com/raspberrypi-tw/lora-sx1278
3. cd lora-sx1278
4. cd 02-p2p
5. python p2p_send.py -f 433

```
**發送端:**
發送端是使用**arduino nano+ra-02**，可以參考[這篇](https://hackmd.io/@c_0KKCwzQE2rsd39mpvNQQ/SJtvpwCiD)

結果:
如果在執行p2p_send.py之後有收到資料即為成功。

參考資料:
1. [用Raspberry Pi + LoRa實做微型物聯網閘道器](https://www.slideshare.net/raspberrypi-tw/raspberry-pi-lora)
2. [SX1276/77/78/79 datasheet](https://cdn-shop.adafruit.com/product-files/3179/sx1276_77_78_79.pdf)

###### tags: `lora` `raspberry pi`