Skip to content
Snippets Groups Projects
Commit a0bfb4ee authored by Martin Karlsson's avatar Martin Karlsson
Browse files

tja laget!

parent 60456c31
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@ function signal = get_audio()
global bass;
persistent lastLastIndex;
persistent lastIndex;
persistent fs;
......@@ -32,6 +31,10 @@ tempRight = tempRight(max(end-diffIndex+1,1):end);
lastLastIndex = lastIndex;
signal = [tempLeft; tempRight];
signal = [tempLeft, tempRight];
%bass.Stop();
end
\ No newline at end of file
addpath(genpath('~/openrobots/lib/matlab/'));
client = genomix.client('turtlebot1-wifi:8080');
bass = client.load('bass');
figure;
......@@ -10,7 +7,7 @@ allAudioRight = [];
lastLastIndex = 0;
lastIndex = 0;
count = 0;
while count < 50
while count < 5
p = bass.Audio();
if count == 0
fs = p.Audio.sampleRate;
......@@ -34,3 +31,7 @@ while count < 50
drawnow
end
bass.Stop()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment