diff --git a/CSCE838-Lab4-Node/CSCE838-Lab4-Node.ino b/CSCE838-Lab4-Node/CSCE838-Lab4-Node.ino index d4b55184934e557945bc6262bc28875bdfe34724..2edda140b34a5ffe0890144b104c9d3c0b43762f 100644 --- a/CSCE838-Lab4-Node/CSCE838-Lab4-Node.ino +++ b/CSCE838-Lab4-Node/CSCE838-Lab4-Node.ino @@ -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 @@ -461,4 +462,4 @@ void TC4_Handler() getNewTemperatureSample(); // five second block counter } -} \ No newline at end of file +}