Code Monkey home page Code Monkey logo

pozyx-java-library's Introduction

Pozyx-Java-Libraly

The Java library to work with the pozyx accurate indoor positioning system

Requisities

  • This library works on Java, an you need to Download and install JDK. Please Download pozyx_lib.jar, and Import this to your project.
  • Windows only install ST's virtual COM driver. After running this installer, please run the correct driver package for your system, located in "C:\Program Files (x86)\STMicroelectronics\Software\Virtual comport driver". Choose Win7 if you run Windows 7 or older. Choose Win8 for Windows 8 or newer. Run "dpinst_amd64.exe" on a 64-bit system, "dpinst_x86.exe"on a 32-bit system.

How to use this library

Download pozyx_lib.jar, and Import this to your project.

After pozyx_lib.jar, was imported on your project, you can confirm if you import the lib correctly, and know which port your Pozyx is on. First, write the sentence below and import the lib on your main class.

import com.kzk.libs.PozyxSerial;

After this, make the instance. If there is no error, you could import the lib, and your pozyx was recognized correctly.

PozyxSerial port = new PozyxSerial(PozyxSerial.getFirstPozyxSerialPort());

How do I know what port my Pozyx is on

  • You can see Ports on your system easily with running port.listSerialPort with your instance.
  • You can quickly find whether there's a recognized Pozyx device using PozyxSerial.getFirstPozyxSerialPort()

Examples

There is an example java application. you can download it, and run to see how this library works.

Also the below, there are some explanation how it works.

  • To check the Farmware Version run below
DeviceDetailes device = new DeviceDetailes();
port.getDeviceDetails(device);   // port is instance from SerialPort, device is instance from DeviceDetailes
  • To control LEDs you can use the codes below. First argument is number of led, and it is 1-4. There are 4 LEDs of the Pozyx Tag. Second argument is boolean and it is true, the LED is turn on, and the opposite is turning off.
port.setLed(1, true);
port.setLed(2, false);
  • To get the acceleration sensor datas, you can type below.
Data ACCdata = new Data();  // build a container for ACC data.
port.getACCData(ACCdata);  // receive the data from pozyx
System.out.println(ACCdata.getData());   // out put the data, and the data type is Integer.

References

This library was made following pypozyx

pozyx-java-library's People

Contributors

kzkyuta avatar

Watchers

 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.