Hello, i'm a new bonsai user and i get a problem. What I want to achieve is that when the mouse enters the area of interest, give it a 2 second shock via the arduino. I want the mouse to be electrocuted for only 2 seconds. But i found that when the Arduino is in the 5V output state, it will remain in this state. So the mice would be electrocuted all the time. I don't know how to set the time of the shock process. I use "Delay", but it doen't work. I would be very grateful if you could help me. Thanks!
![206829921-df3403e2-297a-4ddd-b726-4452eeef149f.jpg](https://groups.google.com/group/bonsai-users/attach/193acc6458063f/206829921-df3403e2-297a-4ddd-b726-4452eeef149f.jpg?part=0.1&view=1)