kopia lustrzana https://github.com/helium/longfi-arduino
remove boards not tested, changed interval
rodzic
bec8c97c40
commit
e6150101c9
32
GPS/GPS.ino
32
GPS/GPS.ino
|
@ -61,7 +61,7 @@ static osjob_t sendjob;
|
||||||
|
|
||||||
// Schedule TX every this many seconds (might become longer due to duty
|
// Schedule TX every this many seconds (might become longer due to duty
|
||||||
// cycle limitations).
|
// cycle limitations).
|
||||||
const unsigned TX_INTERVAL = 60;
|
const unsigned TX_INTERVAL = 10;
|
||||||
|
|
||||||
// Pin mapping
|
// Pin mapping
|
||||||
//
|
//
|
||||||
|
@ -79,34 +79,7 @@ const lmic_pinmap lmic_pins = {
|
||||||
.rssi_cal = 8, // LBT cal for the Adafruit Feather M0 LoRa, in dB
|
.rssi_cal = 8, // LBT cal for the Adafruit Feather M0 LoRa, in dB
|
||||||
.spi_freq = 8000000,
|
.spi_freq = 8000000,
|
||||||
};
|
};
|
||||||
#elif defined(ARDUINO_AVR_FEATHER32U4)
|
|
||||||
// Pin mapping for Adafruit Feather 32u4 LoRa, etc.
|
|
||||||
// Just like Feather M0 LoRa, but uses SPI at 1MHz; and that's only
|
|
||||||
// because MCCI doesn't have a test board; probably higher frequencies
|
|
||||||
// will work.
|
|
||||||
const lmic_pinmap lmic_pins = {
|
|
||||||
.nss = 8,
|
|
||||||
.rxtx = LMIC_UNUSED_PIN,
|
|
||||||
.rst = 4,
|
|
||||||
.dio = {7, 6, LMIC_UNUSED_PIN},
|
|
||||||
.rxtx_rx_active = 0,
|
|
||||||
.rssi_cal = 8, // LBT cal for the Adafruit Feather 32U4 LoRa, in dB
|
|
||||||
.spi_freq = 1000000,
|
|
||||||
};
|
|
||||||
#elif defined(ARDUINO_CATENA_4551)
|
|
||||||
// Pin mapping for Murata module / Catena 4551
|
|
||||||
const lmic_pinmap lmic_pins = {
|
|
||||||
.nss = 7,
|
|
||||||
.rxtx = 29,
|
|
||||||
.rst = 8,
|
|
||||||
.dio = { 25, // DIO0 (IRQ) is D25
|
|
||||||
26, // DIO1 is D26
|
|
||||||
27, // DIO2 is D27
|
|
||||||
},
|
|
||||||
.rxtx_rx_active = 1,
|
|
||||||
.rssi_cal = 10,
|
|
||||||
.spi_freq = 8000000 // 8MHz
|
|
||||||
};
|
|
||||||
#elif defined(MCCI_CATENA_4610)
|
#elif defined(MCCI_CATENA_4610)
|
||||||
#include "arduino_lmic_hal_boards.h"
|
#include "arduino_lmic_hal_boards.h"
|
||||||
const lmic_pinmap lmic_pins = *Arduino_LMIC::GetPinmap_Catena4610();
|
const lmic_pinmap lmic_pins = *Arduino_LMIC::GetPinmap_Catena4610();
|
||||||
|
@ -272,7 +245,6 @@ void do_send(osjob_t* j){
|
||||||
payload[idx] = 0;
|
payload[idx] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//LMIC_setTxData2(1, mydata, sizeof(mydata)-1, 0);
|
|
||||||
Serial.println(F("Packet queued"));
|
Serial.println(F("Packet queued"));
|
||||||
LMIC_setTxData2(1, payload, idx, 0);
|
LMIC_setTxData2(1, payload, idx, 0);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue