Hi Chris,
I wrote to you a couple of months ago about arduino related issues we were having - we though it might be related to the Arduino we were using (an Arduino nano), but we’ve since upgraded to the Arduino nano 33 IoT and are having similar problems.
We have two arduinos in our set up - one for two levers and reward delivery, and one for sending words to blackrock. The Arduino sending words does not have any issues, but the Arduino for the levers and reward does. Sometimes the levers will stop working, or it will show that a lever is being held when it isn’t. After much debugging, we noticed that the issue is directly correlated with correct trials, and narrowed it down specifically to the line of code that assigns the pin for the reward (i.e., taking out the pin assignment resolves the issue, adding it back in reproduces the issue). Our thinking is that the reward pin may have some negative interaction with other pins, so we opted to isolate the reward to a separate Arduino (meaning 3 total arduinos for the set up).
While trying to implement that, we’ve encountered some new issues. Mainly:
-
We are often (~50% of the time, although probably more) experiencing errors upon loading. I’ve attached a screenshot of the error message. It seems that all 3 arduinos have equal likelihood of failing.
-
When we are able to load successfully, the reward output is usually inconsistent. Sometimes it doesn’t work every other correct trial, every 3rd correct trial, etc. The pattern changes, but is consistent, at least within a session. Sometimes the levers stop working. Sometimes everything works correctly.
I’ve attached the code that we’ve been using for debugging purposes - a very simplified version of our program. Any insight into what we might be seeing here?
Thank you,
Jessica
DIO_TEST.mwel (3.1 KB)