|
Hello!
|
Replies: 4 comments 13 replies
|
hi @lgries-lt seems like you tried to attach the workflow but it did not come through, can you zip up the bonsai file, and attach it again? |
|
touch_sensorFed3basics.zip |
|
Hi @lgries-lt so I will preface this by mentioning that one limitation to take into consideration is that Windows is a non-real-time operating system, and timers/events always have a bit of jitter/latency (5-15 ms). Given the timescales you are talking about for the response window (100ms), the jitter might be quite significant, and your response window will probably be longer and variable from trial to trial if you try to code that response window in Bonsai. It might be worth exploring whether you can code the response window logic on a dedicated microcontroller, such as another Arduino. If that limitation is ok with you, though, one way you can do this in Bonsai is with a
Within the
I am not sure how reliable this might be at these timescales, and what happens when multiple touch events are triggered, so there might be further modifications that might be needed. You might want to introduce a timeout for every touch event. You might also want to explore the State Machine tutorial for more information on making the workflow more like a state machine. Modified workflow attached: |
|
Hey @banchan86! We are now trying to increase the number of touch sensor activations per pellet. I was hoping you could help us with this. Maybe a possible node that's capable of modification to slide the number of activations before pellet dispense. |



Hi @lgries-lt, so I added one more modification to reset the pin to LOW after the pellet dispensing. Sounds like it would work anyway without it, but it's generally good practice to return the pin/equipment to the original state. See if the startup pellet is still there with this new workflow?
touch_sensorFed3-modified-threshold-fixed-clearpin.zip