Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SPI.h>
- #include <LoRa.h>
- void setup() {
- Serial.begin(9600);
- while (!Serial);
- Serial.println("LoRa Sender");
- 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 ");
- LoRa.print(counter);
- LoRa.endPacket();
- counter++;
- delay(10000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement