The goal of the OpenBehavior project is to make open source tools more accessible and easier to use for neuroscientists. With support from NSF’s Division of Biological Infrastructure, Lex Kravitz and Cammi Rood and Kevin Chávez López from the Laubach Lab, spent the summer of 2022 developing a workshop on microcontrollers, like the Arduino, and how to apply them to research questions. This week, we presented a two day workshop at the NIH Intramural Campus. A summary of the workshop and links to the code and support documents are below. The workshop was attended by more than 20 trainees working across various NIH institutes (NEI, NIMH, NIDDK), and many working with non-human primates for their research. Based on initial feedback from the attendees, most had not used microcontrollers before and had no programming experience in the Arduino language (despite having coding experience in Python, Matlab, R, C, and Java).

The workshop was broken up into seven sections (five introductory modules and two neuroscience style projects). The goal was for the attendees to finish the workshop with the fundamentals on basic Arduino programming, combining different kinds of inputs and outputs for logging and retrieving of data. All participants were provided with a PyGamer board, a popular Arduino-compatible device made by Adafruit, that they could use to put into practice the lessons learned in every module. LEDs of different kinds and screens built into the PyGamer devices were used to represent possible outputs typical in neuroscience research. Day one consisted of understanding the anatomy of an Arduino sketch, as well as the proper ways of using internal and external components. Day two introduced data storing and two common neuroscience applications of Arduino style microcontrollers. Project One involved writing code for a basic pulse generator for optogenetic stimulation. Project two included a comprehensive set of problems that required the attendees to combine the lessons from all five modules to develop a running wheel that logs behavioral data, stores the data on the microcontroller, and displays behavioral results on a screen integrated into the PyGamer device. Additionally, this module included a basic introduction to 3D printing.

Software from the workshop is available as a library in the Arduino GUI and is also posted here: https://github.com/KravitzLab/MicrocontrollersForNeuroscience

Materials from the workshop, including slides, are available at https://github.com/KravitzLab/MicrocontrollersForNeuroscience/wiki

The workshop is still in development and is planned to be run again at the Winter Conference on Brain Research in January, 2023 and as a satellite event at the Society for Neuroscience meeting in November, 2023.

Special thanks to Rich Krauzlis from the National Eye Institute and his graduate student Hannah Goldbach for arranging for the workshop. Thanks also to the NIH staff for arranging for the space to hold the workshop and to Adafruit for creating the PyGamer board and for providing tons of documentation for learning about microcontrollers and other electronic devices.