两个Lora 模块通信

27 篇文章 1 订阅
8 篇文章 0 订阅

Software preparation

https://www.waveshare.net/w/upload/6/68/SX126X_LoRa_HAT_Code.zip

Hardware connection

To remove M1 and M2, adjust the cap in B.

Communication steps

After running the program, Raspberry Pi A will not move after running the program; Raspberry Pi B blindly presses S, please wait patiently for 10S-20S to receive temperature and other data

If Raspberry Pi A presses I, you need to enter parameters such as address and frequency, for example, the default of the l routine:

0,868,hello

The other side will receive hello

Frequently Asked Questions

  1. The default frequency band of the sample program is 868. Is it OK to use the 433 frequency band? It can also be used, but the data of the 868 frequency band will be printed. It is recommended to change the corresponding code in the main.py file to the 433 frequency band, as shown in the following figure: Before the change

After the change

  1. Why did you not report an error after running the program, but did not print any information? Generally, it is a serial port setting problem. The default serial port used in the routine is ttyS0. If the strawberry pie uses other serial ports such as ttyAMA0, it can be confirmed with the following instructions: ls -l /dev/serial *

  1. Or the serial port is not opened (shell debugging serial port needs to be closed): sudo raspi-config Select Interface Options

NO before YES; Restart:

  1. What if you have used it on a windows computer and you can't get a strawberry pie?

The tuning cap used by the computer is different from the strawberry pie. Please change it to the tuning cap connection of the strawberry pie. See the starting picture for details;

In addition, if the computer may change the address of the module, it is recommended to use the computer configuration software to restore the module to factory settings, as shown in the following figure:

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

信看

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值