You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
372 B
31 lines
372 B
|
|
|
|
|
|
|
|
#include <LoRa.h> |
|
|
|
#define LORA_SOCKET_IP "2.2.2.1" |
|
|
|
#include "lora-socket.h" |
|
|
|
|
|
LoRaSocket socket; |
|
|
|
void setup(){ |
|
|
|
Serial.begin(115200); |
|
if (!LoRa.begin(433E6)) { |
|
Serial.println("Starting LoRa failed!"); |
|
while (1); |
|
} |
|
|
|
socket.ini(); |
|
//socket.udp("lalalla"); |
|
socket.tcp("tomato is rabbish", "2.2.2.2"); |
|
} |
|
|
|
|
|
void loop(){ |
|
|
|
socket.core(); |
|
} |