feat: Implement wired FSK comms in firmware#82
Merged
fanfare-ff merged 14 commits intoShiegeChan:devfrom Jan 23, 2026
Merged
Conversation
Create FSK_TX, FSK_RX, rx_demod scripts
Update Algorithm Add Serial Monitor message transmission
# Conflicts: # projects/FSK_Communication/FSK_RX/FSK_RX.ino # projects/FSK_Communication/FSK_RX/matlab/rx_demod.m # projects/FSK_Communication/FSK_TX/FSK_TX.ino
This was
linked to
issues
Jan 19, 2026
fanfare-ff
requested changes
Jan 23, 2026
Collaborator
fanfare-ff
left a comment
There was a problem hiding this comment.
I checked the styling, please fix these couple of inconsistencies
Logic looks okay, but we will take a deeper look in the setup with not multiple frequencies
| uint8_t error_led = D86; | ||
| static uint32_t lib_error = 0; // Internal library error container | ||
| uint8_t error_led = D86; | ||
| const int SYNC_PIN = 2; // Syncronization signal from PIN 2 digital |
Collaborator
There was a problem hiding this comment.
put this SYNC_PIN to settings below, not error tab
Comment on lines
+75
to
+77
| float fs = 32800 * 32; // Your sample rate | ||
| float f0 = fs / SAMPLES_PER_BIT; // YOUR low frequency | ||
| float f1 = fs * 2 / SAMPLES_PER_BIT; // YOUR high frequency |
Collaborator
There was a problem hiding this comment.
Define these as settings in the beginning of the file
projects/FSK_Communication/FSK_TX/Extra/matlab/modulated_wave.m
Outdated
Show resolved
Hide resolved
projects/FSK_Communication/FSK_TX/Extra/matlab/modulated_wave.m
Outdated
Show resolved
Hide resolved
| for (uint8_t byte_idx = 0; byte_idx < num_bytes; byte_idx++) { | ||
| uint8_t current_byte = data[byte_idx]; | ||
|
|
||
| for (int bit_pos = 7; bit_pos >= 0; bit_pos--) { |
| uint16_t bit_start_index = (byte_idx * BIT_PER_BYTE + 7 - bit_pos) * SAMPLES_PER_BIT; | ||
|
|
||
| if (bit) { // Asign bit '1' to high frequency LUT | ||
| for (int i = 0; i < sine_lut_size_1; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please check if the Pull Request fulfils these requirements
type: Descriptive NameLink related open issue
[TASK] Port FSK demodulator from MATLAB to STM32 #52
Provide a short description
Implemented wired FSK comms project in firmware
Provide a more detailed list of changes
Does this PR introduce a breaking change? (What must be changed in other projects/examples due to this PR?)
N/A
Other information (Anything else reviewers should know)
It was made to work not just with cables but also with the microphones. However, due to frequency matching and the frequency response of the microphones, it would be really hard to get it done.