Giter Club home page Giter Club logo

kxtj3-1057's People

Contributors

ldab avatar nomakewan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kxtj3-1057's Issues

How to do the interrupt?

I see this // Detection threshold, movement duration and polarity
myIMU.intConf(123, 1, 10, HIGH);

But i don't understand.. how to use the interrupt to wake up the microcontroller?

#define preprocessor directives do not work from sketch context

Just a heads up that the example code and any similar code placed into a .ino sketch to define a directive within this library will not pass on to the library correctly.

If you define both LOW_POWER and HIGH_RESOLUTION in a sketch, the error in the header for KXTJ3-1057 will be thrown as expected because the header does accept the directive, and it is the header itself throwing the error. However, if you define HIGH_RESOLUTION by itself in the sketch, this definition will not be retained for KXTJ3-1057.cpp when the Arduino IDE compiles the sketch and its linked libraries. You can check this without any hardware at all by simply modifying your local copy of the library to do something that should cause the library to fail to compile if that branch of code is reached, such as removing a semicolon from the end of a line under the #ifdef HIGH_RESOLUTION context.

A good example of where and how to do this would be here in KXTJ3::applySettings:

#ifdef HIGH_RESOLUTION
	dataToWrite = 0xC0
#endif

One would think that writing #define HIGH_RESOLUTION in the sketch would cause the compilation to fail due to the missing semicolon, but it does not.

You can further prove this by breaking the 'else' part of the start-up delay check. If HIGH_RESOLUTION is defined, that 'else' should never get touched. Yet you can remove semicolons from anywhere in the HIGH_RESOLUTION section with impunity, but if you remove them from the 'else' area the compilation will fail, proving that it is compiling using the LOW_POWER definitions instead.

This appears to be an issue in the Arduino IDE, though many replies on the forums claim this is both intentional behavior and standards-compliant. I have tried several local experiments to somehow allow a definition in the sketch to be passed to the KXTJ3-1057.cpp file but was unable to find a solution short of just defining HIGH_RESOLUTION in KXTJ3-1057.h directly rather than placing the define in the sketch.

"Failed to Initialize IMU"

I am having issues with the IMU not passing the setup. I isolated the issue to this portion. as shown below. I created the error IMU_HW_ERROR6 as this is where my code stops. I'm not sure what portion of I2C is failing. Does anyone have any tips?

image

Interrupt isn't working

Am running the same exact code (the example code) with interrupt pin on GPIO32, but nothing's happening! Does your interrupt work?

16g doesn't work?

When using 16g as accelRange, I get minimum 1.5g, when the sensor is just flat on the table, while 8g or lower "correctly" shows a magnitude of 1.1g.

I doesn't matter what I do with sampleRate or HIGH_RESOLUTION/LOW_POWER flags.
Btw same problem in version 0.1

Am I doing something wrong?

Strange WUF Interrupt Timeout

Hello all,
I am facing strange WUF WAKEUP_COUNTER behavior (let me use datasheet terminology).

Let example, set WAKEUP_COUNTER=100, according to datasheed Fig.4 need to have 100 samples above Threshould. But in my test, if only first 10 samples were above Threshould and other 90 were below Threshold, then interrupt occurs after 100 samples.
I assume that interrupt should occur when all 100 samples are above threshold.

First time I found this issue at my code and then the same result obtained at examples/UnlatchedInterrupt

So I'm using SF timers to fix it and achive neccessary result, but I'm very thankful if somebody help me to explain this issue.

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.