[SX1231] Updated examples

pull/38/head
jgromes 2019-06-02 15:03:10 +02:00
rodzic ff6e87a0dd
commit 076b111e6c
2 zmienionych plików z 29 dodań i 4 usunięć

Wyświetl plik

@ -6,13 +6,23 @@
NOTE: SX1231 offers the same features as RF69 and has the same
interface. Please see RF69 examples for examples on AES,
address filtering, interrupts and settings.
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
*/
// include the library
#include <RadioLib.h>
// SX1231 module is in slot A on the shield
SX1231 rf = RadioShield.ModuleA;
// SX1231 has the following connections:
// NSS pin: 10
// DIO0 pin: 2
// DIO1 pin: 3
SX1231 rf = new Module(10, 2, 3);
// or using RadioShield
// https://github.com/jgromes/RadioShield
//SX1231 rf = RadioShield.ModuleA;
void setup() {
Serial.begin(9600);
@ -64,5 +74,10 @@ void loop() {
// packet was received, but is malformed
Serial.println(F("CRC error!"));
} else {
// some other error occurred
Serial.print(F("failed, code "));
Serial.println(state);
}
}

Wyświetl plik

@ -6,13 +6,23 @@
NOTE: SX1231 offers the same features as RF69 and has the same
interface. Please see RF69 examples for examples on AES,
address filtering, interrupts and settings.
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
*/
// include the library
#include <RadioLib.h>
// SX1231 module is in slot A on the shield
SX1231 rf = RadioShield.ModuleA;
// SX1231 has the following connections:
// NSS pin: 10
// DIO0 pin: 2
// DIO1 pin: 3
SX1231 rf = new Module(10, 2, 3);
// or using RadioShield
// https://github.com/jgromes/RadioShield
//SX1231 rf = RadioShield.ModuleA;
void setup() {
Serial.begin(9600);