GithubHelp home page GithubHelp logo

lewisxhe / sensorlib Goto Github PK

View Code? Open in Web Editor NEW
47.0 5.0 10.0 14.42 MB

Commonly used I2C , SPI device multi-platform libraries

License: MIT License

CMake 0.02% C 78.91% C++ 21.07%
pcf8563 qmc6310 qmi8658 xl9555 bma423 ft6x36 drv2605 gt911 bhi260ap pcf85063

sensorlib's Introduction

 _____                                 _      _  _
/  ___|                               | |    (_)| |
\ `--.   ___  _ __   ___   ___   _ __ | |     _ | |__
 `--. \ / _ \| '_ \ / __| / _ \ | '__|| |    | || '_ \
/\__/ /|  __/| | | |\__ \| (_) || |   | |____| || |_) |
\____/  \___||_| |_||___/ \___/ |_|   \_____/|_||_.__/
                 ···   ···
>  Commonly used I2C , SPI device multi-platform libraries

Build esp-idf Arduino CI PlatformIO CI arduino-library-badge PlatformIO Registry

LICENSE ISSUES FROK STAR releases

PCF8563 PCF85063 HYM8563 QMI8658 BMM150 QMC6310 BMA423 BHI260AP XL9555 DRV2605 CM32181 LTR553 FT5206 FT6206 FT6236 FT3267 CST816S CST816D CST816T CST820 CST226SE CHSC5816 GT911

Support list:

Sensor Description I2C SPI
PCF8563/HYM8563 Real-time clock ✔️
PCF85063 Real-time clock ✔️
QMI8658 IMU ✔️ ✔️
BHI260AP IMU ✔️ ✔️
QMC6310 Magnetic Sensor ✔️
BMM150 Magnetic Sensor ✔️
XL9555 I/O expander ✔️
BMA423 Accelerometer ✔️
DRV2605 Haptic Driver ✔️
CM32181 Ambient Light Sensor ✔️
LTR553 Light & Proximity Sensor ✔️
FT3267 Capacitive touch ✔️
FT5206 Capacitive touch ✔️
FT6206 Capacitive touch ✔️
FT6236 Capacitive touch ✔️
CST820 Capacitive touch ✔️
CST816S/T/D Capacitive touch ✔️
CST226SE Capacitive touch ✔️
CHSC5816 Capacitive touch ✔️
GT911 Capacitive touch ✔️

sensorlib's People

Contributors

caveman99 avatar dizcza avatar lewisxhe avatar lyusupov avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

sensorlib's Issues

Bug w/interrupt mode of GT911?

Hi -- forgive me if I'm off base here but:

At this line you mention that "In the tested GT911 only the falling edge is valid to use, the rest are incorrect" -- I think this may be a mistake?

I've been trying to get the GT911 to work in interrupt mode and I think there might be some other things going on here... I think the INT pin on the GT911 doesn't work, or actually outputs a low enough voltage that it does not trigger the inputs of an ESP32, or maybe there is something wrong with the particular model of screen that I am using (this one.)

In that setInterruptMode method, you set the register with "val |= 0x03;", but if I interpret page 5 of the programming documentation correctly, that uses a "HIGH" to indicate a touch -- or maybe sets it HIGH permanently? I'm not clear.

But either way, you then check for LOW at this line of code.

The problem is, at least on my screen module, it's always low, whether touches are happening or not, even though 0x03 was set. That is, there is never actually any falling edge, so isPressed() always returns true in interrupt mode "FALLING". This at least is confirmed with test code on my device.

I'm suspicious that this is because the output isn't high enough voltage, but I don't know. No library I have found works with interrupt mode with this chip, so far. The screen schematic here and page 21 of the data sheet imply that the output "HIGH" voltage might only be about 1.5V.

Maybe I'm just confused, and it could well be that my screen is just poorly designed, but this is what I have found so far.

Any thoughts? Did this chip actually work in interrupt mode for you?

Thanks for the library!

QMC6310_GetDataExample compile on Arduino Nano

Following error occurs when trying to compile on an arduino nano

Where is ?

and how can I compile it with only the QMC6310 driver.

Arduino: 1.8.19 (Linux), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

In file included from /home/ross/Arduino/libraries/SensorLib/src/bosch/BoschParse.cpp:30:0:
/home/ross/Arduino/libraries/SensorLib/src/bosch/BoschParse.h:36:10: fatal error: vector: No such file or directory
#include
^~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Nano.

i2c_master_bus_handle_t ESP-IDF ?

Cannot find the definition of your i2c_master_bus_handle_t.

$ grep -R i2c_master_bus_handle_t .
./src/TouchDrvCHSC5816.hpp:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/TouchDrvInterface.hpp:    virtual bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr) = 0;
./src/TouchDrvCSTXXX.hpp:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/touch/TouchClassCST226.h:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr);
./src/touch/TouchClassCST816.h:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr);
./src/touch/TouchClassCST816.cpp:bool TouchClassCST816::begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/touch/TouchClassCST226.cpp:bool TouchClassCST226::begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/TouchDrvFT6X36.hpp:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/TouchDrvGT911.hpp:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/SensorCommon.tpp:    bool begin(i2c_master_bus_handle_t i2c_dev_bus_handle, uint8_t addr)
./src/SensorCommon.tpp:    i2c_master_bus_handle_t  bus_handle;
./examples/ESP_IDF_TouchDrv_Example/main/touch_drv.cpp:    extern i2c_master_bus_handle_t bus_handle;
./examples/ESP_IDF_TouchDrv_Example/main/i2c_driver.cpp:i2c_master_bus_handle_t bus_handle;

Looks like you forgot to add ESP-IDF platform related files in the most recent commit.

Question: QMI8658 example gets 1/2 of true acceleration value when gyro is disabled

Sketch: QMI8658_GetDataExample

Normal use case:
when both gyro and accel are enabled - the getAccelerometer() function gives correct acceleration value

Issue:
when gyro is disabled like that:

#if 0
    qmi.configGyroscope(
        /*
        * GYR_RANGE_16DPS
     
< --- skipped --->

    // In 6DOF mode (accelerometer and gyroscope are both enabled),
    // the output data rate is derived from the nature frequency of gyroscope
    qmi.enableGyroscope();
#endif
  • then reported acceleration value is a half of true value.

The workaround is to enable the gyro all the time like the SoftRF did ...
But could we avoid that and get correct acceleration value regardless if the gyro is on or off ?

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.