[SX126x] Fixed typos in examples

This commit is contained in:
jgromes 2019-05-24 14:23:39 +02:00
parent 88d58e52d7
commit 0bafe185a9
5 changed files with 40 additions and 35 deletions

View file

@ -65,20 +65,20 @@ void loop() {
Serial.println(F("success!"));
// print the data of the packet
Serial.print("[SX1262] Data:\t\t");
Serial.print(F("[SX1262] Data:\t\t"));
Serial.println(str);
// print the RSSI (Received Signal Strength Indicator)
// of the last received packet
Serial.print("[SX1262] RSSI:\t\t");
Serial.print(F("[SX1262] RSSI:\t\t"));
Serial.print(lora.getRSSI());
Serial.println(" dBm");
Serial.println(F(" dBm"));
// print the SNR (Signal-to-Noise Ratio)
// of the last received packet
Serial.print("[SX1262] SNR:\t\t");
Serial.print(F("[SX1262] SNR:\t\t"));
Serial.print(lora.getSNR());
Serial.println(" dBm");
Serial.println(F(" dBm"));
} else if (state == ERR_RX_TIMEOUT) {
// timeout occurred while waiting for a packet

View file

@ -1,5 +1,5 @@
/*
RadioLib SX126x Receive with Inerrupts Example
RadioLib SX126x Receive with Interrupts Example
This example listens for LoRa transmissions and tries to
receive them. Once a packet is received, an interrupt is
@ -120,7 +120,7 @@ void loop() {
// print RSSI (Received Signal Strength Indicator)
Serial.print(F("[SX1262] RSSI:\t\t"));
Serial.print(lora.getRSSI());
Serial.println(" dBm");
Serial.println(F(" dBm"));
// print SNR (Signal-to-Noise Ratio)
Serial.print(F("[SX1262] SNR:\t\t"));

View file

@ -23,8 +23,13 @@
// SX1268 module is in slot A on the shield
SX1268 loraSX1268 = RadioShield.ModuleA;
// SX1262 module is in slot B on the shield
SX1262 loraSX1262 = RadioShield.ModuleB;
// if you're not using RadioShield, you can specify
// the connection yourself
// NSS pin: 6
// DIO1 pin: 4
// DIO2 pin: 5
// BUSY pin: 7
SX1262 loraSX1262 = new Module(6, 4, 5, 7);
void setup() {
Serial.begin(9600);
@ -130,7 +135,7 @@ void setup() {
while (true);
}
// Some SX126x have TCXO (temprature compensated crystal
// Some SX126x have TCXO (temperature compensated crystal
// oscillator). To configure TCXO reference voltage,
// the following method can be used.
if (loraSX1268.setTCXO(2.4) == ERR_INVALID_TCXO_VOLTAGE) {

View file

@ -58,20 +58,20 @@ void loop() {
if (state == ERR_NONE) {
// the packet was successfully transmitted
Serial.println(" success!");
Serial.println(F(" success!"));
// print measured data rate
Serial.print("[SX1262] Datarate:\t");
Serial.print(F("[SX1262] Datarate:\t"));
Serial.print(lora.getDataRate());
Serial.println(" bps");
Serial.println(F(" bps"));
} else if (state == ERR_PACKET_TOO_LONG) {
// the supplied packet was longer than 256 bytes
Serial.println(" too long!");
Serial.println(F(" too long!"));
} else if (state == ERR_TX_TIMEOUT) {
// timeout occured while transmitting packet
Serial.println(" timeout!");
Serial.println(F(" timeout!"));
}

View file

@ -1,5 +1,5 @@
/*
RadioLib SX126x Transmit with Inerrupts Example
RadioLib SX126x Transmit with Interrupts Example
This example transmits LoRa packets with one second delays
between them. Each packet contains up to 256 bytes