DEV Community

Reishi Mitani
Reishi Mitani

Posted on


Transmitting a sine wave from Matlab to Pluto

I recently had to configure my Matlab code to send a sine wave to Adalm Pluto. I set the gain to -1 and the frequency to 2.4 GHz. I am pausing the code so that I can check the pulse on my spectrum analyzer.

Below is the code that I used.

deviceNameSDR = 'Pluto'; % Set SDR Device
radio = sdrdev(deviceNameSDR);           % Create SDR device object

txGain = -1;

% sdrTransmitter = sdrtx(deviceNameSDR); % Transmitter properties
% sdrTransmitter.RadioID = 'usb:0';

tx = sdrtx(deviceNameSDR);
tx.RadioID = 'usb:0';
tx.CenterFrequency = 2.415e9;
tx.BasebandSampleRate = fs;
tx.Gain = 0;

fs = 2e6;
sw = dsp.SineWave;
sw.Amplitude = 100;
sw.Frequency = 2.432e9;
sw.ComplexOutput = true;
sw.SampleRate = fs;
sw.SamplesPerFrame = 20000; 
txWaveform = sw();



Enter fullscreen mode Exit fullscreen mode

The pulse looks like below.

Image description

I connected Pluto to my PC and my spectrum analyzer.

Image description

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.