GithubHelp home page GithubHelp logo

lensdriver's Introduction

LensDriver

This program is a driver for Optotune LENS DRIVER 4. By using provided API, user can easily manipulate Optotune EL-10-30 from their C program.

Screenshot

How to Compile

Dependencies

LensDriver requires following third-party application. Please install following libraries before compiling LensDriver.

% sudo port install ctags  # by using MacPorts on macOS

Build LensDriver

% git clone https://github.com/funalab/LensDriver.git
% cd LensDriver/src
% make

How to use

Write a code using LensDriver API

% vim main.c
#include "lensdriver.h"

int main(int argc, char* argv[]) {
  int fd;
  uint32_t mHz = 1000; /* 1 Hz */
  uint16_t ucurrent = 4000;  /* upper current for sinusoidal */
  uint16_t lcurrent = 0;     /* lower current for sinusoidal */
  /* Check arguments */
  if (argc < 2) {
    usage(argv);
    return 0;
  }
  /* Open device */
  fd = dev_open_setup(argv[1]);

  /* Start */
  if (cmd_start(fd) == -1) {
    safe_exit(fd);
  }

  /* Run sinusoidal */
  if (cmd_run_sinusoidal(fd, ucurrent, lcurrent, mHz) == -1) {
    safe_exit(fd);
  }
  sleep(10);

  /* Reset and close device */
  safe_exit(fd);
  return 0;
}

Compile

% make

Run

% ./lensdriver /dev/tty.usb[Tab]
% ./lensdriver /dev/tty.usbmodem1411  # (for example)

References

links

  1. Lens Driver 4 manual (incl. serial firmware protocol)

License

Copyright © 2013-2019 Funahashi Lab., Keio University. Licensed and distributed under the LGPL License, version 2.1.

lensdriver's People

Contributors

funasoul avatar

Stargazers

 avatar Hossein Zarei Oshtolagh avatar Lydia Wuqiong Han avatar Manuel Yves Galliker avatar 조은서(Eun-Seo Cho) avatar  avatar

Watchers

James Cloos avatar  avatar Shori Nishimoto avatar

Forkers

daniel-koudouna

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.