This project demonstrates a half-duplex peer-to-peer (P2P) chat application using Raspberry Pi Pico 2W and Waveshare SX1262 LoRa modules. I tested a distance of a few centimeters between each peer and the speed was amazingly fast (realtime).
- Raspberry Pi Pico 2W
- Waveshare SX1262 LoRa Module
For more information on the Waveshare SX1262 LoRa Module, visit the Waveshare Wiki.
- Arduino IDE installed
- Arduino-Core for Pico 2W (rp2350) installed (check how to install here)
- RadioLib library for Arduino-Core installed (search RadioLib in Arduino IDE and install it)
Connect the Pico 2W to the Waveshare SX1262 module. It's an expansion module that sits on top of the Pico.
If you haven't installed Arduino-Core for Pico 2W, you can't flash to Pico 2W (check Prerequisites)!
-
Clone the repository:
git clone https://github.com/qubit999/pico-p2p-lora-chat-cpp-arduino-ide.git
-
Open the project in Arduino IDE and adjust
radio.setFrequency(868.0);
to match your region (default setting: 868 MHz). -
Select the correct board and port:
- Board:
Raspberry Pi Pico/RP2040/RP2350
- Port: Select the appropriate port for your Pico 2W
- Board:
-
Upload the code to the Pico 2W.
- Power on both Pico 2W devices with the SX1262 modules connected.
- Open the Serial Monitor in Arduino IDE for both devices.
- Type a message in one Serial Monitor and press enter.
- The message should appear on the other device's Serial Monitor.
Now you're ready to chat! :-)
If you find this project useful, you can buy me a coffee. π