Closed jgromes closed 5 years ago
Very nice, how so I do I switch between lora mode, fsk packet mode and afsk direct rtty with kitelib?
Exactly the same way as in LoRaLib:
#include <KiteLib.h>
SX1278 lora = Kite.ModuleA;
RTTYClient rtty(&lora);
void setup() {
}
void loop() {
// send LoRa packet
lora.begin();
lora.transmit("Hello World!");
delay(1000);
// send FSK packet
lora.beginFSK();
lora.transmit("Hello World!");
delay(1000);
// begin RTTY at 434 MHz, 183 Hz shift, 45 baud, 8 data bits, 1 stop bit
rtty.begin(434, 183, 45);
// idle condition lead-in for 500 ms
rtty.idle();
delay(500);
// send RTTY data "Hello World!\r\n"
rtty.println("Hello World!");
// turn off transmitter
lora.standby();
delay(1000);
}
Hi @Bambofy, did you know that KiteLib supports RTTY directly? You don't have to implement it yourself ;)
All you have to do to change from LoRaLib to KiteLib is to replace the included file
and the constructor
Because KiteLib is built on top of LoRaLib, nothing in the API changes, so those two things are literally the only two lines of code you have to change.
After that, you can use the RTTY just as easily as Arduino Serial port: