Skip to content

Commit

Permalink
Upgrade to RadioLib 6.3.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgzhg committed Dec 31, 2023
1 parent 33ad51e commit 3cf17c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
CC = g++
LIBS = -lwiringPi -lm -lpthread -lrt -lcrypt
CFLAGS = -std=c++14 -Wall -DLINUX -DARDUINO=999 -DRADIOLIB_FIX_ERRATA_SX127X -IRadioLib/src/ \
-IRadioLib/src/modules/ -IRadioLib/src/protocols/ -IRadioLib/src/modules/RF69/ -IRadioLib/src/modules/RFM9x/ \
-IRadioLib/src/modules/ -IRadioLib/src/protocols/ -IRadioLib/src/modules/RF69/ \
-IRadioLib/src/modules/SX127x/ -IRadioLib/src/modules/SX126x/ -IRadioLib/src/modules/LLCC68/ \
-IRadioLib/src/linux-workarounds/ -IRadioLib/src/linux-workarounds/SPI/

# Should be equivalent to your list of C files, if you don't build selectively
SRC = $(wildcard RadioLib/src/linux-workarounds/SPI/*.cpp) $(wildcard RadioLib/src/linux-workarounds/*.cpp) \
$(wildcard RadioLib/src/protocols/PhysicalLayer/*.cpp) $(wildcard RadioLib/src/modules/RF69/*.cpp) \
$(wildcard RadioLib/src/modules/RFM9x/*.cpp) $(wildcard RadioLib/src/modules/SX127x/*.cpp) \
$(wildcard RadioLib/src/modules/SX126x/*.cpp) $(wildcard RadioLib/src/modules/LLCC68/*.cpp) \
$(wildcard RadioLib/src/*.cpp) \
$(wildcard RadioLib/src/modules/SX127x/*.cpp) $(wildcard RadioLib/src/modules/SX126x/*.cpp) \
$(wildcard RadioLib/src/modules/LLCC68/*.cpp) $(wildcard RadioLib/src/*.cpp) \
$(wildcard smtUdpPacketForwarder/base64/*.c) $(wildcard smtUdpPacketForwarder/gpsTimestampUtils/*.cpp) \
$(wildcard smtUdpPacketForwarder/*.cpp) $(wildcard *.cpp)

Expand Down
2 changes: 1 addition & 1 deletion RadioLib
Submodule RadioLib updated 150 files
18 changes: 12 additions & 6 deletions Transmit/Transmit.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
@BoardManager esp8266::^3.1.2::https://arduino.esp8266.com/stable/package_esp8266com_index.json
@Board esp8266::esp8266::NodeMCU 1.0 (ESP-12E Module)
@BoardSettings esp8266::NodeMCU 1.0 (ESP-12E Module)::Builtin Led->2||Upload Speed->115200
@DependsOn RadioLib::^6.1.0
@ArduinoTool Drizzle::(<0.16.1)::https://github.com/zhgzhg/Drizzle/releases/download/0.16.1/drizzle-0.16.1-dist.zip
@DependsOn RadioLib::^6.3.0
@ArduinoTool Drizzle::(<0.16.2)::https://github.com/zhgzhg/Drizzle/releases/download/0.16.2/drizzle-0.16.2-dist.zip
RadioLib Transmit Example - configured to be used with the receiver in this project.
RadioLib Transmit Example - desiged for use with the default sample JSON configuration of the LoRaPacketForwarder.
This example transmits LoRa packets with one second delays between them. Each packet contains up to 256 bytes
This example transmits LoRa packets with one second delays between them. Each packet contains up to 255 bytes
of data, in the form of:
- Arduino String
- null-terminated char array (C-string)
- arbitrary binary data (byte array)
ATTENTION - this sketch exemplifies a transmission with a sync-word value set to LoRaWAN, but the sent data
and the transmission frequency is NOT compatible with the LoRaWAN specification. For compatible examples please
refer to those provided by RadioLib.
The purpose of this sketch is to provide means for easy checking whether your current hardware and software setup
is able to exchange data over LoRa.
For more detailed information, see the LoRaLib Wiki
https://github.com/jgromes/RadioLib/wiki
Expand Down Expand Up @@ -103,7 +109,7 @@ void loop() {

int state = lora.transmit(s);

// you can also transmit byte array up to 256 bytes long
// you can also transmit byte array up to 255 bytes long
/*
size_t len = 8;
byte byteArr[len] = {0x01, 0x23, 0x45, 0x56,
Expand All @@ -120,7 +126,7 @@ void loop() {
Serial.println(F(" bps"));

} else if (state == RADIOLIB_ERR_PACKET_TOO_LONG) {
// the supplied packet was longer than 256 bytes
// the supplied packet was longer than 255 bytes
Serial.println(F(" - error, too long!"));

} else if (state == RADIOLIB_ERR_TX_TIMEOUT) {
Expand Down

0 comments on commit 3cf17c2

Please sign in to comment.