Skip to content
Snippets Groups Projects
Commit 784f76b8 authored by smurray798's avatar smurray798
Browse files

Fixed frequency and bandwidth bugs. They were being set up incorrectly (my goof there...)

parent 04a30712
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
/** Defines **/
#define NODE_ID 1
#define NETWORK_FREQUENCY 914
#define NETWORK_FREQUENCY 915
// clock parameters
#define CPU_HZ 48000000
......@@ -180,17 +180,18 @@ static void txdone_func (osjob_t* job)
static void tx_func (osjob_t* job)
{
// say hello
//tx("Hello, world!", 14, txdone_func);
tx("Hello, world!", 14, txdone_func);
SerialUSB.println("Hello world");
// Construct packet
constructTxPacket((Lab3Packet_t*)&txPacket);
// Send the packet
tx((Lab3Packet_t*)&txPacket, sizeof(txPacket), txdone_func);
//tx((Lab3Packet_t*)&txPacket, sizeof(txPacket), txdone_func);
// Print the packet
printPacket((Lab3Packet_t*)&txPacket);
IsErrorDetect((Lab3Packet_t*)&txPacket);
//printPacket((Lab3Packet_t*)&txPacket);
//IsErrorDetect((Lab3Packet_t*)&txPacket);
// Set up the next packet's packet ID
txPacket.PacketID++;
......@@ -221,8 +222,8 @@ void setup()
// this is automatically set to the proper bandwidth in kHz, based on the selected channel
uint32_t uBandwidth;
LMIC.freq = 000000; // originally was 903900000 in the example
uBandwidth = NETWORK_FREQUENCY * 1000000;
LMIC.freq = NETWORK_FREQUENCY * 1000000;; // originally was 903900000 in the example
uBandwidth = 125;
LMIC.datarate = US915_DR_SF9; // DR4 // originally US915_DR_SF7
LMIC.txpow = 20; // originally was 21 in the example
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment