Free wiring guides
Wire the SX1262 LoRa module (Ra-01SH) to the ESP32-S3
LoRa module Ra-01SH (SX1262, 868/915 MHz) on a 2.54 mm breakout, with antenna. Radio that carries a few bytes over hundreds of metres.
When buying: The bare module has 2 mm edge pads that do not fit jumpers: buy it on a breakout board. Vietnam uses the 920–923 MHz band, so do not buy a 433 MHz module.
Which pin goes where
| On the part | On the ESP32-S3 |
|---|---|
| 3V3 | 3V3 |
| GND | GND |
| SCK | GPIO 12 |
| MISO | GPIO 13 |
| MOSI | GPIO 11 |
| NSS | GPIO 10 |
| RST | GPIO 14 |
| DIO1 | GPIO 2 |
| BUSY | GPIO 21 |
Wire it with the USB cable unplugged. Follow the names printed on your own part: makers sometimes reorder the pins.
In 3D
Example sketch
// LoRa module Ra-01SH (SX1262, 868/915 MHz) on a 2.54 mm breakout, with antenna
// on the ESP32-S3-DevKitC-1 (N8R2 or N16R8)
// https://stem.manusignal.com/en/parts/sx1262-lora-ra-01sh-esp32-s3
#include <SPI.h>
#include <RadioLib.h>
const int PIN_SCK = 12;
const int PIN_MISO = 13;
const int PIN_MOSI = 11;
const int PIN_NSS = 10;
const int PIN_RST = 14;
const int PIN_DIO1 = 2;
const int PIN_BUSY = 21;
// Ra-01SH is an SX1262. Always fit the antenna before powering the radio.
SX1262 radio = new Module(PIN_NSS, PIN_DIO1, PIN_RST, PIN_BUSY);
void setup() {
Serial.begin(115200);
SPI.begin(PIN_SCK, PIN_MISO, PIN_MOSI, PIN_NSS);
radio.tcxoVoltage = RadioLibTCXOVoltage_t::VoltageNone;
ConfigLoRa_t config;
config.frequency = 921400000UL; // 921.4 MHz: check the band that is legal where you live
int state = radio.begin(config);
Serial.println(state == RADIOLIB_ERR_NONE ? "Radio ready" : "Radio failed: check the wiring");
}
void loop() {
String message;
if (radio.receive(message) == RADIOLIB_ERR_NONE) Serial.println(message);
}
- Tools > Board > ESP32S3 Dev Module, then Tools > Port and choose the board's port.
- RadioLib (version 8 or newer): install it from Sketch > Include Library > Manage Libraries.
This sketch is compiled for the board before the page is published. It has not been run on real hardware by us.
What you should see
Open the Serial Monitor at 115200. It prints “Radio ready”, then any LoRa message it hears on the same settings.
If it does not work
- The sketch says the radio failed to start.
- Nine wires must all be right: check NSS, RST, DIO1 and BUSY first. If they are, your module may have a TCXO: change VoltageNone to Voltage1V6 in the sketch. An SX1276 module needs a different class.
Build something with it
These Build Packs use this part on this board, with the same pins.
More parts on the ESP32-S3
- ST7789 1.54 in TFT screenESP32-S3 · 7 wires
- ST7789 2.0 in TFT screenESP32-S3 · 7 wires
- GC9A01 round screenESP32-S3 · 7 wires
- SSD1306 OLED 0.96 in screenESP32-S3 · 4 wires
- SSD1306 OLED 0.91 in screenESP32-S3 · 4 wires
- 4.2 in e-paper screenESP32-S3 · 8 wires
- TTP223 touch sensorESP32-S3 · 3 wires
- Push buttonESP32-S3 · 2 wires
- Foot switchESP32-S3 · 2 wires
- Slide switchESP32-S3 · 2 wires
- SW-520D tilt switchESP32-S3 · 2 wires
- MC-38 door switchESP32-S3 · 2 wires
- AM312 PIR motion sensorESP32-S3 · 3 wires
- HC-SR04 ultrasonic sensorESP32-S3 · 4 wires
- Capacitive soil moisture sensorESP32-S3 · 3 wires
- BME280 sensorESP32-S3 · 4 wires
- MLX90614 infrared thermometerESP32-S3 · 4 wires
- SGP30 air quality sensorESP32-S3 · 4 wires
- HX711 load cellESP32-S3 · 4 wires
- KY-040 rotary encoderESP32-S3 · 5 wires
- 3×4 keypadESP32-S3 · 7 wires
- Passive buzzerESP32-S3 · 2 wires
- WS2812 LED ringESP32-S3 · 3 wires
- WS2812 LED stickESP32-S3 · 3 wires
- WS2812B LED stripESP32-S3 · 3 wires
- KY-016 RGB LEDESP32-S3 · 4 wires
- 2-channel relay moduleESP32-S3 · 4 wires
- 28BYJ-48 stepper motor (ULN2003)ESP32-S3 · 6 wires
- MAX98357A I2S amplifierESP32-S3 · 5 wires