Skip to content

Commit 45a30c3

Browse files
authored
Merge pull request #18 from aschr/master
Update MKRWAN.h
2 parents 1dfb0c9 + ad10bc5 commit 45a30c3

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/MKRWAN.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,34 @@ class LoRaModem : public Stream
598598
return true;
599599
}
600600

601+
/*
602+
DataRate Modulation SF BW bit/s
603+
0 LoRa 12 125 250
604+
1 LoRa 11 125 440
605+
2 LoRa 10 125 980
606+
3 LoRa 9 125 1'760
607+
4 LoRa 8 125 3'125
608+
5 LoRa 7 125 5'470
609+
6 LoRa 7 250 11'000
610+
*/
611+
612+
bool dataRate(uint8_t dr) {
613+
sendAT(GF("+DR="), dr);
614+
if (waitResponse() != 1) {
615+
return false;
616+
}
617+
return true;
618+
}
619+
620+
bool setADR(bool adr) {
621+
sendAT(GF("+ADR="), adr);
622+
if (waitResponse() != 1) {
623+
return false;
624+
}
625+
return true;
626+
}
627+
628+
601629
private:
602630

603631
bool isArduinoFW() {

0 commit comments

Comments
 (0)