Giter VIP home page Giter VIP logo

mousebehaviour's Introduction

Camera server (PointGrey) and arduino based behaviour setup. Everything is automated using cmake. Both arduino and camera must be connected to compute before doing the following.

Download and setup

To download the code from a particular branch

 $ git clone --recursive -b bhumika https://github.com/ananthamurthy/eyeBlinkBehaviour 
 $ cd eyeBlinkBehaviour 
 $ ./bootstap.sh    # To setup your Ubuntu system.

The script bootstap.sh will try to configure your system. You must have sudo permissions. And you must be using Ubuntu since the camera server only compiles on Ubuntu. In case, something odd happens, raise an issue on github.

Once bootstrap is successful, to build and upload to arduino

$ mkdir _build 
$ cd _build
$ cmake -DANIMAL_NAME=k2 -DSESSION_NUM=1 -DSESSION_TYPE=2 ..
$ make run              # to run the whole setup, (arduino and camera both must be connected)or
$ make miniterm         # Just to test arduino board. (camera need to be connected)

Press CTRL+C in terminal to close the session. If just running make miniterm, press CTRL+] to come out of miniterm (scrolling text).

CMake options

Port

If you need to change the arduino port, pass -DPORT=/path/to/port option to cmake. On a linux system, e.g.

 $ cmake -DPORT=/dev/ttyACM1 -DANIMAL_NAME=k2 -DSESSION_NUM=1 -DSESSION_TYPE=2 ..

Dependencies

Most of them are in source. You need to install the following:

  • cmake
  • gnuplot-x11
  • python-serial
  • pip install readchar
  • pip install gnuplotlib

Analysis

  • sudo apt install python-tifflib

Commands

  • Puff : p
  • Tone : t
  • Led : l
  • Select : s
  • Reboot : ctrl+c

What is being prinited.

See function write_data_line in file src/main.ino.

Print data line

sprintf(msg_  
        , "%lu,%d,%d,%d,%d,%d,%d,%d,%d,%s"
        , timestamp, trial_count_, puff, tone, led
        , motion1, motion2, camera, microscope, trial_state_
        );

mousebehaviour's People

Contributors

ananthamurthy avatar dilawar avatar soumyadead avatar bhumikasingh0110 avatar shriya9 avatar anzalks avatar

Watchers

James Cloos avatar

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.