arms22 / SoftModem

Audio Jack Modem Library for Arduino
BSD 3-Clause "New" or "Revised" License
184 stars 36 forks source link

Changed to code from latest zip + added comments #3

Closed rmeister closed 7 years ago

rmeister commented 7 years ago

There are some differences in demodulation between this repo and the archive at Google Code (Softmodem-005.zip) . Which ones are the latest?

With the code from the archive it did work for me, therefore I include the changes in this PR.

Also comments were changed, by @xeonqq and by me.

arms22 commented 7 years ago

github are the latest.

Recent changes,

rmeister commented 7 years ago

Ok, with the default frequencies this works pretty good. But with my setup, it seems like it is the other way around: when using the archive version I get less errors.

This is my setup:

#define SOFT_MODEM_BAUD_RATE   (1225)
#define SOFT_MODEM_LOW_FREQ    (2450) 
#define SOFT_MODEM_HIGH_FREQ   (4900)
#define SOFT_MODEM_RX_BUF_SIZE (32)

Sending is no problem with this frequencies, but received data is heavily corrupted. Any idea what the problem could be?

arms22 commented 7 years ago

Please check the following two points .

  1. transmission frequency is correct?
  2. Do not distorted transmitted waveform ?

You can check easily be recorded to transmission sound using Audacity.

arms22 commented 7 years ago

I translated the comments of Japanese to English .

rmeister commented 7 years ago

Checked that already, the generated signal is fine and has the correct frequencies. I think the problem is somewhere in the decoding logic, as with the version from the archive it does work better.

rmeister commented 7 years ago

Tried to find out which of the code changes make the difference and it seems the moving average is the problem. For my setup, it is more reliable without moving average calculation.

arms22 commented 7 years ago

ok. I added the option to enable/disable the moving average calculation(default disable).

rmeister commented 7 years ago

Ok, thanks!