This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Raspberry Pi Camera: | |
The stock camera is nice. But, you can get the same sensor from many 3rd parties that also has an "M12" lens mount. This is like the one we used in lab. You can get a lens set and find the right one for your purposes and FOV: | |
Link to M12 lens kit | |
https://www.amazon.com/dp/B07L92S9MT/ref=twister_B07P935WRY?_encoding=UTF8&th=1 | |
Links to camera: | |
IR sensitive with M12 mount: | |
https://www.amazon.com/Arducam-Camera-Raspberry-Interchangeable-LS-2717CS/dp/B013JV4Z7K?ref_=fsclp_pl_dp_1&th=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from picamera import PiCamera | |
from time import sleep | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(11, GPIO.IN) | |
camera = PiCamera() | |
inPreview=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% plot the first write | |
% 1) plot all | |
figure(309) | |
subplot(2,1,1) | |
plot(aa.psDatatm,aa.psDatav1,'k-','linewidth',1) | |
% and derivative | |
hold on | |
plot(aa.psDatatm(2:end),diff(aa.psDatav1),'r-','linewidth',1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% subplot | |
figure(100) | |
h3=subplot(1,6,1:4); | |
hold all | |
for n=1:numel(session.lick_times) | |
if numel(session.lick_times{n}>0) | |
if analyzedBehavior.hitTrials(n)==1 | |
mColor=[0 0 0]; | |
elseif analyzedBehavior.hitTrials(n)==0 | |
mColor=[0 0 1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
-- modified with VOX's dictionary | |
if application "VOX" is running then | |
tell application "VOX" | |
if player state is 1 then | |
return (get artist) & " - " & (get track) | |
else | |
return "" |