How to output Arduino digital HIGH when two boolean inputs are true in Bonsai? #2374
Unanswered
chengyuan717
asked this question in
Q&A
Replies: 1 comment 6 replies
-
|
Hi Chengyuan so couple of things that you could do first:
Hopefully these few steps can resolve the issues you have been facing, if you need more help after that, check back in here! There are also similar threads in the forums on how to set up the Arduino that you can search for. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I’m currently working on a closed-loop optogenetics experiment controlled by Bonsai and Arduino. I want to use Arduino digital inputs to determine whether the behavior is in an inner trial or in the inter-trial interval. Specifically, I have two boolean logic values, and I want the Arduino digital output to send a HIGH signal only when both booleans are true (i.e., logical AND).
In Bonsai, I tried using CombineLatest to merge the two boolean streams, then used a PythonTransform node to perform an AND operation on them. However, during runtime, it seems the Arduino digital input cannot correctly detect the Arduino port state or output as expected.
I have attached my Bonsai program and screenshots for reference.
Has anyone encountered a similar issue or can provide advice on the best way to implement this logic for Arduino digital output control in Bonsai?
Thank you very much in advance for any help!
Best regards,
Yuan
close-loop_practice1.bonsai.zip
5716)
Beta Was this translation helpful? Give feedback.
All reactions