Dear Josh,
Thanks for your work!
I try to test my Port Interface Poard, and the sma code like this:
WATER_DURATION = 5.0;
TIMEOUT_SEC = 0.1;
sma = NewStateMachine();
sma = AddState(sma, 'Name', 'WaitForInput', ...
'Timer', TIMEOUT_SEC, ...
'StateChangeConditions', {'Tup', 'Reward'}, ...
'OutputActions', {});
sma = AddState(sma, 'Name', 'Reward', ...
'Timer', WATER_DURATION, ...
'StateChangeConditions', {'Tup', 'Reward_Off'}, ...
'OutputActions', {'Valve1', 1});
sma = AddState(sma, 'Name', 'Reward_Off', ...
'Timer', 0.1, ...
'StateChangeConditions', {'Tup', 'exit'}, ...
'OutputActions', {'Valve1', 0});
SendStateMachine(sma);
RawEvents = RunStateMachine;
The Valve had no response, but the LED lighted on. Was the name of 'Valve1' right? I tried to get the name from Bpod System Info Board.
Looking forward to your reply!