@name 
@inputs W S
@outputs A T
@persist 
@trigger 

runOnTick(1)
if(first()){T = 0}
if(T == 0){
if(W){

T++    
}}
if(T == 1){
if(S){

T++    
}}
if(T == 2){
if(W){

T++    
}}
if(T == 3){
if(S){

T = 0 
}}

if(changed(T)){
A = 1
timer("A1",500)}
if(clk("A1")){
A = 0}
