Files
Scanning the repository...
Last update 6 years 4 months
by wero1414
FilesFwLoRa_PHYLoRaSender | |
---|---|
.. | |
LoRaSender.ino |
LoRaSender.ino#include <SPI.h> #include <LoRa.h> int counter = 0; void setup() { Serial.begin(9600); while (!Serial); Serial.println("LoRa Sender"); LoRa.setPins(SS, RFM_RST, RFM_DIO0); if (!LoRa.begin(915E6)) { Serial.println("Starting LoRa failed!"); while (1); } } void loop() { Serial.print("Sending packet: "); Serial.println(counter); // send packet LoRa.beginPacket(); LoRa.print("hello "); LoRa.print(counter); LoRa.endPacket(); counter++; delay(5000); }