Giter Site home page Giter Site logo

arduino's Introduction

Arduino sketches and Bonsai layouts to control laboratory equipment


๐Ÿ“– Introduction

The repository hosts Arduino sketches and bonsai layouts used at the LeDoux Lab to control lab equipment and data acquisition pipelines in several behavioral experiments.

โš ๏ธ This repo is in development and bugs may exist in the code despite the relentless will to remove them! Make sure to run all appropriate tests before using it.

๐Ÿ“‚ Repository content

- arduino_sketches         # lab sketches and wiring schematics
| - external_libraries
| - sketches

- bonsai_layouts           # workflows for data acquisition  
| - bonsai_room_1113
| - bonsai_room_1114
| - bonsai_room_1115

- README.md
- LICENSE
- .gitignore

๐Ÿ”จ Requirements

The contents of this repo will require one or more of the frameworks below:

  • Arduino: Opensource framework to interact with microcontrollers.
  • Bonsai: Opensource data acquisition software.
  • Fritzing: Software used to draw the wiring schematics.

โœ๏ธ Resources

The easiest way to get started is by completing the projects of the (awesome) arduino starting kit. It contains several interesting projects that introduce the newcomers to all that is needed (including coding) to build great stuff!

arduino's People

Contributors

audreyyin9877 avatar joseferncruz avatar

Watchers

 avatar  avatar

arduino's Issues

rAA -- implement LED panel feature and sensor checks

Update the rAA code to contain the same LED panel feature used in the mAA code. The LED panel should reflect the results of sensor check. If the sensor check:

  • Fails -- LED panel should blink red
  • Succeeds -- LED panel should turn on green
  • Calculating -- LED panel should blink yellow

mAA -- Update mAA to contain a timer

In order to maintain protocol consistency between rAA and mAA, the mAA should also contain a 30 second limit for how long the arduino will search for the subject

See #4 for proposed feature / solution to bug

mAA -- how to identify missing trials

Same problem as #16

If we were to implement a timer to start the next CS-US cycle (usually when the sensors are unble to get triggered), we would need a new method to identify the missing trials. Proposed idea:

Failed trial = 0 sec latency
Successful trial = x sec latency
Untriggered trials = -1 sec latency

AA - add new LED to test sensors

Create a new interface for checking sensors and detect anomalies in the readings.

The objective is to add 3 LEDs to the board: 1 RED, 1 YELLOW and 1 GREEN.

The implementation should run as follows:

  • once the arduino board is reset, it should turn the RED LED ON.
  • enter a loop to make continuous readings of the sensor over a short period of time. Turn YELLOW LED ON while on this process.
  • check whether the minimum value in the array of sensor readings is below the threshold
  • If YES, then GREEN LED ON. Otherwise, Turn the RED LED ON in blinking mode.
  • System must print messages to inform user about the process

rAA -- how to identify the missing trials

If we were to implement a timer to start the next CS-US cycle (usually when the sensors are unble to get triggered), we would need a new method to identify the missing trials. Proposed idea:

  • Failed trial = 0 sec latency
  • Successful trial = x sec latency
  • Untriggered trials = -1 sec latency

Serial fails to print the final session statistic when TOTAL_AVOIDANCE_SUCCESS equals 0

If TOTAL_AVOIDANCE_SUCCESS = 0 the last line of code (Serial string output) does not get printed.

Proposed change:

  • Change Serial.print("MEAN SHUTTLING LATENCY (SEC): 0"); --> Serial.print("MEAN SHUTTLING LATENCY (SEC): 0"); Serial.println(TOTAL_AVOIDANCE_SUCCESS);

This happens because Bonsai parses serial content for statements that contain a new line character when creating the serial output. As serial.println does not include a \n character, this may create the issue.

rAA -- Reorganize the global variables section

The global variables section has a different layout than the mAA code. Reorganizing rAA's global variable section would maintain layout consistency between the two codes.

When reorganizing the global variables section, make the layout more accessible for the user:

  • Experimental variables are far away from the eyesight of the user
  • Experimental variables should align with one another

add tone module to substitute tone generator

Replace local physical tone generator with sound generated with the arduino tone module.

Things to do:

  • add new tone variables
  • add tone generation during first trial
  • add tone generation during alternation trials

AA - trial does not start because IR sensor is not triggered

Problem: If the subject does not trigger the infrared sensor, the trial will continue forever.

A possible solution is to define a time timer for sensor detection during trials. If the sensor fails to be triggered, initiate next CS-US cycle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.