ESP32 RTX via HAM Radio #104
Rino664
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
I guess it can sometimes decode the message from partial data while the sliding window is "viewing" part of the message. Probably the you can ignore messages that have been decoded in very quick succession, or you can add a message ID (or parity bit) to your payload to be able to recognize when a new message is received |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to use your beautifull library to implement a repeter telemetry and commands.
I have modified the ESP32 RX including also the TX (now send only a fix text every 15 sec).
It works but with a strange effect in the RX, it double the receved string in the serial output.
Here the code:
`
// ### Analog Microphone
//
// | MCU | Mic |
// | ------- | --------- |
// | GND | GND |
// | 3.3V | VCC / VDD |
// | GPIO 35 | Out |
//
const int kPinSpeaker = 14;
#define MIC_ANALOG
#include <ggwave.h>
#include <soc/adc_channel.h>
#include <driver/i2s.h>
// Pin configuration
const int kPinLED0 = 2;
// Global GGwave instance
GGWave ggwave;
char txt[64];
#define P(str) (strcpy_P(txt, PSTR(str)), txt)
// Audio capture configuration
using TSample = int16_t;
using TSampleInput = int16_t;
const size_t kSampleSize_bytes = sizeof(TSample);
// High sample rate - better quality, but more CPU/Memory usage
const int sampleRate = 24000;
const int samplesPerFrame = 512;
TSample sampleBuffer[samplesPerFrame];
TSampleInput * sampleBufferRaw = sampleBuffer;
const i2s_port_t i2s_port = I2S_NUM_0;
// ADC configuration
const adc_unit_t adc_unit = ADC_UNIT_1;
const adc1_channel_t adc_channel = ADC1_GPIO35_CHANNEL;
// i2s config for using the internal ADC
const i2s_config_t i2s_config = {
.mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_ADC_BUILT_IN),
.sample_rate = sampleRate,
.bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,
.channel_format = I2S_CHANNEL_FMT_ONLY_RIGHT,
.communication_format = I2S_COMM_FORMAT_I2S_LSB,
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
.dma_buf_count = 4,
.dma_buf_len = samplesPerFrame,
.use_apll = false,
.tx_desc_auto_clear = false,
.fixed_mclk = 0
};
// Helper function to output the generated GGWave waveform via a buzzer
void send_text(GGWave & ggwave, uint8_t pin, const char * text, GGWave::TxProtocolId protocolId) {
}
void setup() {
Serial.begin(115200);
while (!Serial);
pinMode(kPinLED0, OUTPUT);
digitalWrite(kPinLED0, LOW);
}
int niter = 0;
int tLastReceive = -10000;
GGWave::TxRxData result;
unsigned long t0=millis();
void loop() {
}`
Many thanks
Rino.
Beta Was this translation helpful? Give feedback.
All reactions