https://github.com/royerlab/picard4dusbstage
https://github.com/royerlab/picard4dusbstage
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/royerlab/picard4dusbstage
- Owner: royerlab
- Created: 2018-09-25T11:28:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-21T13:16:58.000Z (over 7 years ago)
- Last Synced: 2025-07-03T09:11:37.827Z (12 months ago)
- Language: Java
- Size: 9.76 MB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Picard 4D USB stage
==
This library contains the device drivers of the [Picard Industries 4D USB stage](http://picard-industries.com/products/usb-4d-stage.html) and
associated java wrappers. The device driver (PiUsb.dll, PiUsb.h and PiUsb.lib) were
kindly proviced by Picard Industries. The files originate from here:
http://picard-industries.com/software/usb-4d-stage.zip
Using this library
---
In order to use this library to control a Picard 4D USB stage from a maven based Java project, you need to add a dependency and a repository to your `pom.xml` file:
```xml
net.clearcontrol
picard4dusbstage
0.0.4
hslh
http://dl.bintray.com/haesleinhuepf/snapshots
```
Import the class to connect to a stage like this:
```Java
import pi4dusb.PiUsbLinearStage;
```
You can then home and move the stage like this:
```java
int linearStageSerial = 122;
PiUsbLinearStage linearStage = new PiUsbLinearStage(linearStageSerial);
// home the stage
linearStage.home();
// move it ahead
linearStage.setPosition(linearStage.getPosition() + 2);
//cleanup
linearStage.dispose();
```
You find example code on how to use the stage in the demo code located in the
[demo class](http://github.com/clearcontrol/picard4dusbstage/src/main/resources/pi4dusb/demo/PiStageDemo.java). To run the class, change the serial numbers first.
Developing this library
---
It is recommended to develop this library using an integraded development environment
such as IntelliJ or Eclipse. Open the `build.gradle` in the root directory as project
to start developing. To check if the project was loaded correctly and the stage is functional,
it is recommended to run the main method [demo class](http://github.com/clearcontrol/picard4dusbstage/src/main/resources/pi4dusb/demo/PiStageDemo.java).
If you want to update the generated java wrapper, update the configuration file `piusb.config.win.jnaertor` and run jnaerate.bat from the command line.
Authors
---
[Robert Haase](mailto:rhaase@mpi-cbg.de)
Further information
---
[gradle](https://gradle.org/)
[maven](https://maven.apache.org/)