Skip to content

Optotune LensDriver - Driver for Optotune LENS DRIVER 4.

License

Unknown, LGPL-2.1 licenses found

Licenses found

Unknown
LICENSE.txt
LGPL-2.1
COPYING.txt
Notifications You must be signed in to change notification settings

funalab/LensDriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Optotune LensDriver - Driver for Optotune LENS DRIVER 4.

Resources

License

Unknown, LGPL-2.1 licenses found

Licenses found

Unknown
LICENSE.txt
LGPL-2.1
COPYING.txt

Stars

Watchers

Forks

Packages

No packages published