Hello,
My lab has recently adopted Bonsai for implementation of our behavior experiments. We are interested in running fear conditioning with Bonsai, using it to coordinate a web camera, a simple speaker, and signals to a box generating shocks.
We have been impressed with the ease and flexibility of Bonsai thus far but have gotten stuck when trying to use an Arduino Uno in our workflow. I followed the instructions to install Firmata onto the Arduino and confirmed that it was capable of communicating with it via my PC. I then attempted to use the installed Arduino functions (e.g. DigitalOutput) to attempt to do the following:
-Start a camera (beginning of trial)
-After 3 minutes has elapsed (since camera on or trial start), turn Arduino pin 13 to HIGH for 1 second (initiate shock)
-Turn the pin off (end the shock)
-Wait 3 more minutes
-Repeat above shock procedure
I have been unable to figure out how to tell the Arduino to turn the pins ON and OFF from Bonsai--do you have any guidance or suggestions regarding how to implement this workflow with Bonsai?
Thanks,
Chris