close all;
clear all;

Sample_frequency = 50000;   	% sampling frequency
number_points_to_gather = 10000;

[d,t] = msgets0(Sample_frequency, number_points_to_gather);
d = d * 5 / 32768;				% Convert ADC values to voltages

knownF = 500;       			% known frequency
numberCycle = 2;    			% desired number of waveforms displayed

ptswave = Sample_frequency / knownF; 	% number of data points per wave

length = numberCycle * ptswave * ( 1 / Sample_frequency);

plot(t,d);
axis([0 length -1.1 1.1]);
hold on
plot(t,d,'ok');
axis([0 length -1.1 1.1]);

msstop; % This needs to go somewhere, otherwise the frequency values don't seem to always work
