Commit 70c31d32 authored by Fredrik Bagge Carlsson's avatar Fredrik Bagge Carlsson
Browse files

Merge branch 'master' of gitlab.control.lth.se:letter2martin/turtlerob1

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