mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
kxtj3: Add java/python/javascript examples
* Java/Python/Javascript examples * change usleep to upm_delay_us in C++ example * Add Java example to CMakeLists Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com> Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:

committed by
Noel Eck

parent
01cc3a0734
commit
186bbfab76
@ -27,6 +27,7 @@
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include "kxtj3.hpp"
|
||||
#include "upm_utilities.h"
|
||||
|
||||
#define SENSOR_ADDR 0x0f
|
||||
#define I2C_BUS 0
|
||||
@ -50,7 +51,7 @@ void print_acceleration_data(upm::KXTJ3 &dev)
|
||||
xyz = dev.GetAccelerationVector();
|
||||
std::cout << std::fixed << std::setprecision(3)
|
||||
<< xyz[0] << " | " << xyz[1] << " | " << xyz[2] << std::endl;
|
||||
usleep(wait_time);
|
||||
upm_delay_us(wait_time);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user