This commit is contained in:
2025-02-08 20:58:48 -05:00
parent 0218469e70
commit 223a5270e7
2 changed files with 17 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
#include <RadioHead.h>
#include <SPI.h>
#include <RH_RF95.h>
@@ -19,7 +21,7 @@ void setup() {
digitalWrite(RFM95_RST, HIGH);
// while (!Serial); // wait until serial console is open, remove if not tethered to computer
Serial.begin(9600);
Serial.begin(115200);
delay(100);
Serial.println("Feather LoRa RX Test!");
@@ -57,13 +59,13 @@ void loop() {
delay(1000); // Wait 1 second between transmits, could also 'sleep' here!
Serial.println("Transmitting..."); // Send a message to rf95_server
char radiopacket[20] = "Hello World # ";
itoa(packetnum++, radiopacket+13, 10);
char radiopacket[RH_RF95_MAX_MESSAGE_LEN] = "LATIN";
itoa(packetnum++, radiopacket+13, 180);
Serial.print("Sending "); Serial.println(radiopacket);
radiopacket[19] = 0;
//radiopacket[19] = 0;
Serial.println("Sending..."); delay(10);
rf95.send((uint8_t *)radiopacket, 20);
rf95.send((uint8_t *)radiopacket, RH_RF95_MAX_MESSAGE_LEN);
Serial.println("Waiting for packet to complete..."); delay(10);
rf95.waitPacketSent();
@@ -76,7 +78,7 @@ void loop() {
if (rf95.recv(buf, &len)) {
digitalWrite(LED_BUILTIN, HIGH);
RH_RF95::printBuffer("Received: ", buf, len);
//RH_RF95::printBuffer("Received: ", buf, len);
Serial.print("Got: ");
Serial.println((char*)buf);
Serial.print("RSSI: ");

View File

@@ -1 +1,10 @@
Init readme
## References
### antennae stuff
https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module/antenna-options