arduino-tx : trying to use original library

This commit is contained in:
Georgi Gerganov
2022-05-30 23:24:59 +03:00
parent 11f8c660b6
commit 33581cf029
4 changed files with 115 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ const int kPinButton0 = 2;
const int kPinButton1 = 4;
void setup() {
//Serial.begin(57600);
Serial.begin(57600);
//pinMode(kPinLed0, OUTPUT);
//pinMode(kPinSpeaker, OUTPUT);
@@ -64,6 +64,20 @@ bool isDown = false;
void loop() {
Serial.println("hello");
auto p = GGWave::getDefaultParameters();
p.sampleFormatInp = GGWAVE_SAMPLE_FORMAT_I16;
p.samplesPerFrame = 128;
p.payloadLength = 4;
p.operatingMode = (ggwave_OperatingMode) (GGWAVE_OPERATING_MODE_TX | GGWAVE_OPERATING_MODE_TX_ONLY_TONES);
GGWave::getTxProtocols() = GGWave::TxProtocols({{ "[MT] Fastest", 24, 3, 1, 2, true, }});
GGWave ggwave(p);
while (true) {
delay(1000);
Serial.println("working");
}
//int but0 = digitalRead(kPinButton0);
//int but1 = digitalRead(kPinButton1);