Included the header for the radiohead library. Also added define statments for radio modules pins.

This commit is contained in:
jakeg00dwin 2024-09-25 11:14:12 -07:00
parent b054ca3821
commit ad48a00b03
1 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,8 @@
#include <FastLED.h> // Library to control the LED ring (WS2812) #include <FastLED.h> // Library to control the LED ring (WS2812)
#include <TinyGPS++.h> // Library to handle GPS data #include <TinyGPS++.h> // Library to handle GPS data
#include <SoftwareSerial.h> // Software serial for GPS communication #include <SoftwareSerial.h> // Software serial for GPS communication
#include <RH_RF95.h> //
// MAGNETOMETER (LIS2MDL) CONFIGURATION // MAGNETOMETER (LIS2MDL) CONFIGURATION
Adafruit_LIS2MDL lis2mdl = Adafruit_LIS2MDL(12345); // Create magnetometer object Adafruit_LIS2MDL lis2mdl = Adafruit_LIS2MDL(12345); // Create magnetometer object
@ -29,6 +31,13 @@ CRGB leds[NUM_LEDS]; // Array to hold LED colors
SoftwareSerial gpsSerial(GPS_RX_PIN, GPS_TX_PIN); // Software serial for GPS SoftwareSerial gpsSerial(GPS_RX_PIN, GPS_TX_PIN); // Software serial for GPS
TinyGPSPlus gps; // TinyGPS++ object to process GPS data TinyGPSPlus gps; // TinyGPS++ object to process GPS data
// Radio defines
#define RFM95_CS 8
#define RFM95_INT 7
#define RFM95_RST 4
#define RF95_FREQ 915.0
// Variables // Variables
static int prevHeading = -1; // Store previous heading to avoid frequent updates static int prevHeading = -1; // Store previous heading to avoid frequent updates
unsigned long lastUpdate = 0; // Time tracking for updates unsigned long lastUpdate = 0; // Time tracking for updates