-
Notifications
You must be signed in to change notification settings - Fork 2
LoRa (RFM95W & WIFI NodeM ESP8266)
blahlt edited this page Sep 6, 2020
·
2 revisions

- ArduinoIDE aplinkoje einame į Tools->Manage Libraries... ir sudiegiam LoRa by Sandeep Mistry (v0.7.2)
- Sujungiam WIFI NodeM ESP8266 ir RFM95W
| WIFI NodeM ESP8266 | RFM95W |
|---|---|
| GND | GND |
| 3V3 | 3.3V |
| D0 | RESET |
| D4 | NSS |
| D5 | SCK |
| D6 | MISO |
| D7 | MOSI |
- Imtuvas (angl. receiver)
#include <LoRa.h>
#define PIN_SPI_SS D4
#define PIN_SPI_MOSI D7
#define PIN_SPI_MISO D6
#define PIN_SPI_SCK D5
#define PIN_RESET D0
#define PIN_DIO0 -1 // not used
void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println("Init Serial...[OK]");
LoRa.setPins(PIN_SPI_SS, PIN_RESET, PIN_DIO0);
Serial.print("Init LoRa receiver...");
if (!LoRa.begin(866E6)) {
Serial.println("[FAILED]");
Serial.println("Check wires and reset.");
while(1);
}
Serial.println("[OK]");
Serial.println("Registers:");
LoRa.dumpRegisters(Serial);
Serial.println("Registers...[DONE]");
}
void loop() {
int packetSize = LoRa.parsePacket();
if (packetSize) {
Serial.print("Received packet '");
while (LoRa.available()) {
Serial.print((char)LoRa.read());
}
Serial.print("' with RSSI ");
Serial.println(LoRa.packetRssi());
}
}Monopolinės antenos ilgis: ~86.5mm
- https://arduino-esp8266.readthedocs.io/en/2.7.0/index.html
- https://github.com/sandeepmistry/arduino-LoRa
- https://pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ (neveikia, nes neteisingai sujungti moduliai)
- https://github.com/JhonControl/ESP8266-LoRa-RFM95/blob/master/Transm_LoRa_ESP8266/Transm_LoRa_ESP8266.ino
- https://learn.adafruit.com/adafruit-feather-32u4-radio-with-lora-radio-module/using-the-rfm-9x-radio
- https://randomnerdtutorials.com/esp32-lora-rfm95-transceiver-arduino-ide/