Technical report of the machine

master
mDescape 2 years ago
parent c8d4c42893
commit 6f3263dc84
  1. 12
      Code/C7000_Controller/netcoreapp3.1/SkCommIo.log
  2. BIN
      Code/Matlab/Results/VisualThreshold/1/1_VisualThreshold_0.2s1Repetitions_15-05-2020_10.14.00.mat
  3. BIN
      Code/Matlab/Results/VisualThreshold/1/1_VisualThreshold_0.2s1Repetitions_15-05-2020_10.14.00.png
  4. BIN
      Code/Matlab/Results/VisualThreshold/1/1_VisualThreshold_0.2s1Repetitions_15-05-2020_10.14.47.mat
  5. BIN
      Code/Matlab/Results/VisualThreshold/1/1_VisualThreshold_0.2s1Repetitions_15-05-2020_10.14.47.png
  6. 26
      Code/Matlab/Safety_addon_READ.m
  7. 15
      Code/Matlab/VisualThresholdsExperiment.m
  8. 11
      Code/Matlab/Visual_GetSpectrum.m
  9. 2
      Code/Matlab/Visual_OpenLoop_CalibrateStim.m
  10. 2
      Code/Matlab/Visual_Present_single_image.m
  11. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/.suo
  12. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/Server/sqlite3/storage.ide
  13. BIN
      Documents/Technical_report_Descalzo.pdf
  14. BIN
      Documents/Technical_report_TFG_entrega1.docx
  15. BIN
      images/Halogen_spectrum.jpg
  16. BIN
      images/Projector_spectrum.jpg
  17. BIN
      images/int_vs_lux_2.jpg
  18. BIN
      images/lightsensor_vout_128.jpg
  19. 0
      images/logo-matlab.fig

@ -866,3 +866,15 @@
[#2020/05/07 14:14:43.085]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/08 10:00:12.906]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/08 10:02:44.710]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:06:58.403]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:08:02.346]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:25:06.777]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:26:57.295]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:27:38.292]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:27:43.384]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:28:15.903]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:34:53.845]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/05/28 13:35:46.434]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/06/02 12:53:47.899]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/06/02 12:54:32.868]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/06/02 12:57:36.699]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000

@ -0,0 +1,26 @@
delete(instrfind);
data = [];
time = [];
s = serial("COM6", 'BaudRate', 115200, 'TimeOut', 5, 'Terminator', 'LF');
fopen(s);
for a = 1:100
data = [data, str2double(fgets(s))]; %You don't know if the first read vale is a time or a data value
time = [time, str2double(fgets(s))]; %If you guessed wrong trnaspose the X and the Y axis befor plot
end
fclose(s);
delete(s);
clear s
data = data*5/1023;
time = time - min(time);
plot(time, data, 'Linewidth', 1);
%plot(data, time, 'Linewidth', 1);
ylim([-0.1 5.1]);
xlim([0 63]);
xlabel('Time [ms]', 'Fontsize', 14);
ylabel('Voltage out [V]', 'Fontsize', 14);
title('Light sensor V(out)', 'Fontsize', 18);

@ -11,9 +11,9 @@ function [threshold, history, responsesStaircase, reactionTimes] = VisualThresho
% Experiment parameters
minIntensity = 0; %lx
maxIntensity = 30000; %lx
initIntensity = 2000;
stepSizeIntensity = 1000; %lux
maxIntensity = 5000; %lx
initIntensity = 2000; %lx
stepSizeIntensity = 250; %lx
interStimuliColor_sRGB = [0 0 0];
stimulusDuration = 0.2;
@ -176,8 +176,11 @@ function [threshold, history, responsesStaircase, reactionTimes] = VisualThresho
keyCode(AKEY) = 1;
end
end
end
end
%READ THE SAFETY ADD-ON HERE
%if not safe -> break everything and close with a warning
% Get participant's response
if isDown
tReaction = GetSecs;
@ -534,7 +537,7 @@ function stimImg = GenerateCalibratedImage(desired_lux, realIntensity_avr_cal, i
inputIntensity = 0;
end
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], inputIntensity, 0);
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], inputIntensity, 0, [1 1 1]);
inputIntensity = 0;

@ -2,7 +2,7 @@ X_1nm = [];
Y_1nm = [];
X_5nm = [];
Y_5nm = [];
StimuliColor_RGB = [1 0 0];
StimuliColor_RGB = [1 1 0];
screenSizePix2 = zeros(1,2);
screenSizePix1 = zeros(1,2);
@ -42,9 +42,12 @@ sca;
C7000_End_program(tcpObj); %Return the C-7000 to its manual control
fclose(tcpObj); %Close the server
Y_1nm = Y_1nm/max(Y_1nm); %"normalize" the vector
plot(X_1nm, Y_1nm, 'Linewidth', 2);
xlim([380 800]);
xlabel('Wavelength [nm]', 'Fontsize', 14);
ylabel('Amplitude [a.u.]', 'Fontsize', 14);
title('Red+Green stimulus spectrogram', 'Fontsize', 18);

@ -1,4 +1,4 @@
num_measures = 5; %Number of measures will be made in each cycle of the calibration
num_measures = 10; %Number of measures will be made in each cycle of the calibration
interStimuliColor_sRGB = [0 0 0];
screenSizePix2 = zeros(1,2);

@ -18,7 +18,7 @@ Screen('FillRect', wPtr, interStimuliColor_sRGB);
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', wPtr);
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], 1, 0, background_RGB);
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], 128/255, 0, background_RGB);
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Loading…
Cancel
Save