Dear Bpod fellows,
I am new to Bpod (r0.8) and currently getting familiar with the software by reading the wiki. I have a very simple question about an example on your wiki page:
[b]% 2. This code generates a simple state matrix that flashes the port LEDs of ports 1-3 for 0.1 second each (assuming an LED is connected to the port's PWM line).
sma = NewStateMatrix();
[b]sma = AddState(sma, 'Name', 'LightPort1', ...
[b] 'Timer', 0.1,...
[b] 'StateChangeConditions', {'Tup', '[b]LightPort2[b]'},...
[b] 'OutputActions', {'PWM1', 255});
[b]sma = AddState(sma, 'Name', 'LightPort2', ...
[b] 'Timer', 0.1,...
[b] 'StateChangeConditions', {'Tup', '[b]LightPort3[b]'},...
[b] 'OutputActions', {'PWM2', 255});
[b]sma = AddState(sma, 'Name', 'LightPort3', ...
[b] 'Timer', 0.1,...
[b] 'StateChangeConditions', {'Tup', '[b]exit[b]'},...
[b] 'OutputActions', {'PWM3', 255});
Is it possible to flash the LED at Port1 during the entire sequence (i.e. create states within a state)? So something like: Turn on LED 1 -> Turn on LED 2 (for 0.1 sec) -> Turn on LED 3 (for 0.1 sec) -> Turn off LED 1?
Also, does the 'exit' condition mean that the PWM3 will be turned to 0 as soon as the timer has expired?
[b]sma = AddState(sma, 'Name', 'LightPort3', ...
[b] 'Timer', 0.1,...
[b] 'StateChangeConditions', {'Tup', '[b]exit[b]'},...
[b] 'OutputActions', {'PWM3', 255});
[b]Thanks