ethierlab / Motopya

MotoTrak python Version
MIT License
0 stars 0 forks source link

analog output #11

Open siamakhaz opened 2 months ago

siamakhaz commented 2 months ago

@ethierc please correct me if I'm wrong about this

We need an analogue output to signal the TDT device, indicating the trial's state. This will allow the TDT to synchronize the fibre photometry data with the behavioural data.

siamakhaz commented 2 months ago

for this im suggest using from ```gpiozero import PWMOutputDevice

and a simple lowpass filter on PWM output image

ethierc commented 2 months ago

@ethierc please correct me if I'm wrong about this

We need an analogue output to signal the TDT device, indicating the trial's state. This will allow the TDT to synchronize the fibre photometry data with the behavioural data.

We might not need to have an output for TDT, if Pynapse works fine. However, it could be good to have that possibility anyways. Not sure it needs to be analog though. we could use digital pulses.

But we will eventually need analog outputs to control 1 speakers and 1 or 2 LEDs. so at least 3, more is better if it's easy.

ethierc commented 2 months ago

I guess for the LEDs and speakers, it could also be digital out 🤔

siamakhaz commented 2 months ago

@ethierc we can have as much as we need for LEDs and a speaker or buzzer. there is no limitation for this but to know the usage we can have a better implementation.

ethierc commented 2 months ago

I did not think of that before, but I guess for speaker we could just use square (DigOut) waves

ethierc commented 2 months ago

to record the rotating angle with the fiber photometry system is possible using the two A-B digital signals directly. So I don't think we need analog out if it's complicated to do