My LoRaWAN Signal Mapping MSc summer project. This is a copy of the actual repository with personal information removed.
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.
 
 
 
 
 
 

76 lines
2.2 KiB

#pragma once
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include "settings.custom.h"
/*
* This is the main settings file - customise it to match your setup.
* Don't forget that you need to take a copy of settings.custom.h.example as
* settings.custom.h, and fill in the private keys the program needs to talk
* over LORaWAN.
*/
//////////////////////////////////
////////////// Main //////////////
//////////////////////////////////
// The speed at which we should talk over our main hardware serial connection.
#define BAUD_PC 115200
// Multiple devices can use the same SPI data pin AFAIKT, but some libraries
// *cough* SD *cough* are too stupid to figure out which pin it is on their own.
#define PIN_SPI_DATA 9
// The 'done' pin to pulse to signal to the TPL5111
#define PIN_TPL_DONE 8
/////////////
/// RFM95 ///
/////////////
// The SPI chip-select pin for the RFM 95
#define PIN_SPI_CS_RFM95 10
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = PIN_SPI_CS_RFM95,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 6, 7},
};
/////////////////////////////////
////////////// GPS //////////////
/////////////////////////////////
// The *TX* gin of the GPS device.
// This is swapped because we receive the GPS device's message on our side on
// the RX pin, and the GPS device transmits messages on the TX.
#define PIN_GPS_RX 5
// The *RX* pin on the GPS device.
// This is swapped because where the GPs device is receiving, we aresending and
// vice versa.
// The TX / RX here are according to *our* side, not the GPS device's side.
#define PIN_GPS_TX 4
// The speed at which we should talk to the GPS device. Some GPS devices
// require a certain speed in order to use certain commands, so it's important
// that you check the datasheets for the device you're using.
// 9600 is the correct speed for a NEO-6M.
#define BAUD_GPS 9600
//////////////////////////////////
////////// microSD Card //////////
//////////////////////////////////
// The chip select pin that activates the connection to the microSD card over SPI.
#define PIN_SPI_CS_SD 3
// The filename on the microSD card to store data in.
#define SD_FILENAME "data.tsv"
// The filename on the microSD card to store debug information in
#define SD_FILENAME_DEBUG "debug.log"