[SX1231] Updated examples
This commit is contained in:
parent
ff6e87a0dd
commit
076b111e6c
2 changed files with 29 additions and 4 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue