Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WavePlayer to trigger multiple waves
#3
(09-11-2018, 02:29 AM)Josh Wrote: Hi Claudina,


You'd need to set a trigger profile:

W = BpodWavePlayer('COM3');
...
Load 3 waveforms with W.loadWaveform()
...
W.TriggerProfiles(1, Smile = [1 2 3]; % Set trigger profile 1 = waverforms 1, 2 and 3 simultaneously
W.TriggerProfileEnable = 'On';

Now in MATLAB, you can trigger all 3 with:
W.Play(1);

You can also load a serial message and then trigger all 3 from the state machine output actions:
LoadSerialMessages(1, ['P' 1]);
...
(in AddState's output actions)
{'WavePlayer1', 1}

Also see trigger profiles here.

I hope this helps!
-Josh

Thanks Josh, I figured it out as you said. Only difference, the profile 1 gets triggered by the message LoadSerialMessages(1, ['P' 0]). 
Thanks again!
Claudia
Reply


Messages In This Thread
RE: WavePlayer to trigger multiple waves - by Claudina - 09-11-2018, 12:27 PM

Forum Jump: