Hi Josh,
I'm trying to use Analog Output Module to generate LED pulses with ramp-up and ramp-down intensity. I can almost successfully control the LED shape, but when I check the output with oscilloscope, I realized that at the end of each loop, there is one sample that has 3-4V output. I made sure that this sample is not included in my looped waveform. Indeed, even if I generate a simple zero vector as a waveform and loop it, there are always one sample at the end of each loop that gives strange value. Do you have any idea why this happens?
I'm using WavePlayer, and my code for setting up WavePlayer is as follows (to make it simple, here I generated a simple zero vector waveform):
LEDsamplerate = 10000;
LEDwaveform = zeros(1,100);
W = BpodWavePlayer('COM3');
W.BpodEvents = {'On', 'Off', 'Off', 'Off'};
W.TriggerMode = 'Toggle';
W.LoopDuration = [20, 0, 0, 0];
W.LoopMode = {'On','Off','Off','Off'};
W.SamplingRate = LEDsamplerate;
W.loadWaveform(1, LEDwaveform);
LoadSerialMessages('WavePlayer1', {['P' 1 0]});
With this simple zero waveform, I still see a 5V sample at the end of each loop in my oscilloscope. I would really appreciate it if you could let me know how I can resolve this issue.
Thanks,
Hiroyuki