Required libraries and software packages

Software packages

  • Arduino IDE: https://www.arduino.cc/en/software
  • Teensyduino: https://www.pjrc.com/teensy/teensyduino.html

Libraries

Basic

  • Optical sensors ADNS 2160: https://github.com/zapmaker/OptiMouse
  • Stepper motor control: https://luni64.github.io/TeensyStep/
  • Encoder: https://github.com/PaulStoffregen/Encoder

Futures implementations

These are Optical motion sensor options with higher capabilities than the ADNS 2160. All of them use the SPI bus. - Optical sensors ADNS 3500: https://github.com/Tom101222/Adns-3050-Optical-Sensor - Optical sensors PWM3360: https://github.com/mrjohnk/PMW3360DM-T2QU - Optical sensors ADNS 9800: https://github.com/mrjohnk/ADNS-9800

Basic Arduino code description

The different Arduino sketches are available on: https://github.com/atranvan/vestibular_setup/tree/Files/Arduino%20code

Closed_loop.ino

The closed loop code uses the measured angle increment as a setpoint for the proportional control. The animal can control the rotation of the platform.

Open_loop.ino

The Open loop example uses two variables introduced by the user (eg. 0-360 degres) as a setpoints to switch every certain interval and therefore to swing from one to the other.

Open_loop_SD.ino

This example is like the open loop example but saving the different variables on the SD card on the Teensy 3.5 SD card slot. That program was used to record accuracy and repeatability data of the stage.

Open_loop_moveAsync.ino

This example is like the Open_loop_SD.ino but instead of using the proportional control it only bases its rotation movement on the teensystep method moveAsync() which is a non-blocking trapezoidal profile movement.