[RTTY] Added links to default config wiki page
This commit is contained in:
parent
96f7a51ec9
commit
92ded01234
2 changed files with 18 additions and 25 deletions
|
@ -14,6 +14,9 @@
|
||||||
- Si443x/RFM2x
|
- Si443x/RFM2x
|
||||||
- SX128x
|
- SX128x
|
||||||
|
|
||||||
|
For default module settings, see the wiki page
|
||||||
|
https://github.com/jgromes/RadioLib/wiki/Default-configuration
|
||||||
|
|
||||||
For full API reference, see the GitHub Pages
|
For full API reference, see the GitHub Pages
|
||||||
https://jgromes.github.io/RadioLib/
|
https://jgromes.github.io/RadioLib/
|
||||||
*/
|
*/
|
||||||
|
@ -26,32 +29,25 @@
|
||||||
// DIO0 pin: 2
|
// DIO0 pin: 2
|
||||||
// RESET pin: 9
|
// RESET pin: 9
|
||||||
// DIO1 pin: 3
|
// DIO1 pin: 3
|
||||||
SX1278 fsk = new Module(10, 2, 9, 3);
|
SX1278 radio = new Module(10, 2, 9, 3);
|
||||||
|
|
||||||
// or using RadioShield
|
// or using RadioShield
|
||||||
// https://github.com/jgromes/RadioShield
|
// https://github.com/jgromes/RadioShield
|
||||||
//SX1278 fsk = RadioShield.ModuleA;
|
//SX1278 radio = RadioShield.ModuleA;
|
||||||
|
|
||||||
// create RTTY client instance using the FSK module
|
// create RTTY client instance using the FSK module
|
||||||
RTTYClient rtty(&fsk);
|
RTTYClient rtty(&radio);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
|
||||||
// initialize SX1278
|
// initialize SX1278 with default settings
|
||||||
Serial.print(F("[SX1278] Initializing ... "));
|
Serial.print(F("[SX1278] Initializing ... "));
|
||||||
// carrier frequency: 434.0 MHz
|
int state = radio.beginFSK();
|
||||||
// bit rate: 48.0 kbps
|
|
||||||
// frequency deviation: 50.0 kHz
|
|
||||||
// Rx bandwidth: 125.0 kHz
|
|
||||||
// output power: 13 dBm
|
|
||||||
// current limit: 100 mA
|
|
||||||
// sync word: 0x2D 0x01
|
|
||||||
int state = fsk.beginFSK();
|
|
||||||
|
|
||||||
// when using one of the non-LoRa modules for RTTY
|
// when using one of the non-LoRa modules for RTTY
|
||||||
// (RF69, CC1101, Si4432 etc.), use the basic begin() method
|
// (RF69, CC1101, Si4432 etc.), use the basic begin() method
|
||||||
// int state = fsk.begin();
|
// int state = radio.begin();
|
||||||
|
|
||||||
if(state == ERR_NONE) {
|
if(state == ERR_NONE) {
|
||||||
Serial.println(F("success!"));
|
Serial.println(F("success!"));
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
- CC1101
|
- CC1101
|
||||||
- Si443x/RFM2x
|
- Si443x/RFM2x
|
||||||
|
|
||||||
|
For default module settings, see the wiki page
|
||||||
|
https://github.com/jgromes/RadioLib/wiki/Default-configuration
|
||||||
|
|
||||||
For full API reference, see the GitHub Pages
|
For full API reference, see the GitHub Pages
|
||||||
https://jgromes.github.io/RadioLib/
|
https://jgromes.github.io/RadioLib/
|
||||||
*/
|
*/
|
||||||
|
@ -23,15 +26,15 @@
|
||||||
// DIO0 pin: 2
|
// DIO0 pin: 2
|
||||||
// RESET pin: 9
|
// RESET pin: 9
|
||||||
// DIO1 pin: 3
|
// DIO1 pin: 3
|
||||||
SX1278 fsk = new Module(10, 2, 9, 3);
|
SX1278 radio = new Module(10, 2, 9, 3);
|
||||||
|
|
||||||
// or using RadioShield
|
// or using RadioShield
|
||||||
// https://github.com/jgromes/RadioShield
|
// https://github.com/jgromes/RadioShield
|
||||||
//SX1278 fsk = RadioShield.ModuleA;
|
//SX1278 radio = RadioShield.ModuleA;
|
||||||
|
|
||||||
// create AFSK client instance using the FSK module
|
// create AFSK client instance using the FSK module
|
||||||
// pin 5 is connected to SX1278 DIO2
|
// pin 5 is connected to SX1278 DIO2
|
||||||
AFSKClient audio(&fsk, 5);
|
AFSKClient audio(&radio, 5);
|
||||||
|
|
||||||
// create RTTY client instance using the AFSK instance
|
// create RTTY client instance using the AFSK instance
|
||||||
RTTYClient rtty(&audio);
|
RTTYClient rtty(&audio);
|
||||||
|
@ -39,19 +42,13 @@ RTTYClient rtty(&audio);
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
|
||||||
// initialize SX1278
|
// initialize SX1278 with default settings
|
||||||
Serial.print(F("[SX1278] Initializing ... "));
|
Serial.print(F("[SX1278] Initializing ... "));
|
||||||
// carrier frequency: 434.0 MHz
|
int state = radio.beginFSK();
|
||||||
// bit rate: 48.0 kbps
|
|
||||||
// frequency deviation: 50.0 kHz
|
|
||||||
// Rx bandwidth: 125.0 kHz
|
|
||||||
// output power: 13 dBm
|
|
||||||
// current limit: 100 mA
|
|
||||||
int state = fsk.beginFSK();
|
|
||||||
|
|
||||||
// when using one of the non-LoRa modules for RTTY
|
// when using one of the non-LoRa modules for RTTY
|
||||||
// (RF69, CC1101, Si4432 etc.), use the basic begin() method
|
// (RF69, CC1101, Si4432 etc.), use the basic begin() method
|
||||||
// int state = fsk.begin();
|
// int state = radio.begin();
|
||||||
|
|
||||||
if(state == ERR_NONE) {
|
if(state == ERR_NONE) {
|
||||||
Serial.println(F("success!"));
|
Serial.println(F("success!"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue