Meritve na terenu
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
// --- TABELA ---
|
||||
const uint16_t FM_FREQ=2; // 30 preletov/sekundo
|
||||
const uint16_t FM_FREQ=2;
|
||||
const uint16_t FM_SAMPLES=4096; // 12 bitov
|
||||
uint16_t FM_table_pos[FM_SAMPLES];
|
||||
uint16_t FM_table_neg[FM_SAMPLES];
|
||||
@@ -30,6 +30,7 @@ void setup() {
|
||||
// 1. Postavimo serijsko komunikacijo
|
||||
SerialUSB.begin(115200);
|
||||
while (!SerialUSB); // Počakaj na povezavo z računalnikom
|
||||
delay(5000);
|
||||
|
||||
// 2. Poračunamo wavetable za FM signal
|
||||
for (uint16_t i=0; i<FM_SAMPLES; i++) {
|
||||
@@ -157,7 +158,6 @@ void loop() {
|
||||
|
||||
// --- KORAK 4: POŠILJANJE PODATKOV ---
|
||||
// Pošljemo samo prvo polovico spektra (SAMPLES / 2)
|
||||
SerialUSB.write((uint8_t*) &FM_FREQ, sizeof(uint16_t));
|
||||
SerialUSB.write((uint8_t*)vReal, (SAMPLES / 2) * sizeof(float));
|
||||
// Ponastavi zastavico
|
||||
if (bufferA_Ready) bufferA_Ready = false;
|
||||
|
||||
Reference in New Issue
Block a user