Giter Club home page Giter Club logo

apds9930's Introduction

Oh hey 👋

I'm an Italian CS nerd living in Milan. I like putting Arch Linux on things. I like hardware that doesn't phone home, unless that home is mine.

I have a separate place for forked repos: @depau-forks

Wanna see what I enjoy working on? Here's a few projects of mine I really like:

  • EtchDroid (Kotlin) is a popular app that lets you rootlessly write GNU/Linux distro images to USB drives on Android
  • LevIoT (hw/sw) (KiCAD/Py) is a custom PCB for my home air purifier
  • Wi-Se (hw/sw) (KICAD/C++) is a wireless UART adapter board
  • meross2mqtt (Py) bridges Meross smart plugs to home automation software via MQTT, with Homie autodiscovery!
  • My shitty DNS proxy (Go) is very shitty but it has been solving all my home network DNS woes since 2022!
  • My SAPI Speech Server (C#/.NET, Docker, Wine) makes Windows Text-To-Speech voices work on Linux!
  • My WearOS World Clock App (Kotlin) is slick and useful, and it includes watchface tiles.

apds9930's People

Contributors

atomoc avatar codemee avatar depau avatar elfishi avatar mikhailnatalenko 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apds9930's Issues

GestureTest Example

Thanks for the library! The Gesture Test example sketch is not included in the examples folder, it would be a great help if you included an example of gesture controls for the module.

Random proximity values

I'm getting valid ch0 and ch1 values but proximity looks like random values between 350 and 450, no connection at all to movements in front of the sensor.

Also, from the quick start:

"Select File -> Examples -> APDS9930 -> GestureTest"

There is no such example, that's for 9960 only?

Use more than one Apds9930

I need to use 5 apds9930 sensors simultaneously since I am making a line follower robot.
And I can't change the factory I2C address to read the different sensors.
Can you tell me how you can change the factory I2C address of these sensors?

can't understand the output data

i use ur code on my uno,the lines connected just likes urs, as fllow:

Arduino Pin 	APDS-9930 Board 	Function
3.3V 	VCC 	Power
GND 	GND 	Ground
A4 	SDA 	I²C Data
A5 	SCL 	I²C Clock
2 	INT 	Interrupt

The VL is NC.
I upload the code (ProximitySensor.ino) to the uno,and then, i open the Serial Monitor, the output like this:

------------------------
APDS-9930 - ProximityLED
------------------------
APDS-9930 initialization complete
Proximity sensor is now running
0: 0x5
1: 0xFF
2: 0xFF
3: 0xFF
4: 0xFF
5: 0xFF
6: 0x0
7: 0x0
8: 0x0
9: 0x0
A: 0x32
B: 0x0
C: 0x22
D: 0x0
E: 0x8
F: 0x2E
12: 0x39
13: 0x22
14: 0x0
15: 0x0
16: 0x0
17: 0x0
18: 0x4F
19: 0x1
1E: 0x0
Proximity: 298
Proximity: 271
Proximity: 275
Proximity: 284
Proximity: 283

the output range from 250 to 320,whatever i put hands above it or not. i can't find the rules .

So, i ask for your help.
waiting!
thank u !

Usage of Wire library.

In the file "APDS9930/src/APDS9930.cpp", the function "wireWriteDataBlock()" is not used, but it contains a bug.

The sequence should be: beginTransmission - write - write - write - endTransmission
However, instead of writing data, both Wire.beginTransmission() and Wire.write() are called (multiple) times.
The extra Wire.beginTransmission() is at the moment in line 1082. That line may be removed.

A similar issue is in the original code from Sparkfun.

APDS-9930 Breakout Board link

Hi Davide,
I think the link to dx.com is nowadays too expensive;
you can get APDS-9930 breakout boards now for ~1€ - take a look here ...

then, as you already stated, the APDS-9930 and APDS-9960 breakout boards are optically fully identical;
I have both (the red ones) and even the PCB print on the back is with both 'APDS-9960', so it makes probably sense to add a small sample which reads the chip id so one can identify what he really got ...

apds99xx_read_chipid.zip

python apds-9930 library problem on raspberry pi 3

I have problem when i use python apds-9930 library i use your test program on github but i see this error on python shell

Traceback (most recent call last):
  File "/home/pi/apds-9930v1.py", line 10, in <module>
    a = APDS9930(busno)
  File "build/bdist.linux-armv7l/egg/apds9930/__init__.py", line 107, in __init__
    raise SensorError("Device ID not recognized: {0}".format(hex(self.id)))
SensorError: Device ID not recognized: 0x29

i use raspberry pi 3

i think you can help me

and i have a question can use this library in python 3

thank you

Not working when connected to multiple I2C devices

I have connected the module to an Arduino I2C bus. Although it works if it is the only device in the bus, it doesn't seem to be working when multiple devices (NOT multiple APDS-9900, but multiple I2C devices, one of which is APDS-9900) are connected at the same time. What could be the issue?
It either gives me unexpected values or gives me an reading error.

APDS-9930 proximity issue

Hello
I found this implementation for APDS-9930, I have that module and used it with arduino, but your proximity example always
shows

APDS-9930 - ProximitySensor

APDS-9930 initialization complete
Proximity sensor is now running
0: 0x5
1: 0xFF
2: 0xFF
3: 0xFF
4: 0xFF
5: 0xFF
6: 0x0
7: 0x0
8: 0x0
9: 0x0
A: 0x32
B: 0x0
C: 0x22
D: 0x0
E: 0x8
F: 0x2E
12: 0x39
13: 0x22
14: 0x0
15: 0x0
16: 0x0
17: 0x0
18: 0xE2
19: 0x1
1E: 0x0
Proximity: 462
Proximity: 480
Proximity: 415
Proximity: 459
Proximity: 455
Proximity: 425
Proximity: 406
Proximity: 406
Proximity: 380
Proximity: 409
Proximity: 422
Proximity: 485
Proximity: 447
Proximity: 427
Proximity: 430

values no matter what distance I use. It is Always around 400.

Ambient example look ok:
Ambient: 255.09 Ch0: 239 Ch1: 99
Ambient: 220.65 Ch0: 213 Ch1: 89
Ambient: 169.15 Ch0: 142 Ch1: 59
Ambient: 30.42 Ch0: 29 Ch1: 12
Ambient: 25.75 Ch0: 24 Ch1: 10
Ambient: 20.44 Ch0: 25 Ch1: 10
Ambient: 19.80 Ch0: 21 Ch1: 9
Ambient: 24.46 Ch0: 22 Ch1: 9
Ambient: 19.80 Ch0: 21 Ch1: 9
Ambient: 243.18 Ch0: 229 Ch1: 95
Ambient: 237.23 Ch0: 224 Ch1: 93
Ambient: 231.91 Ch0: 221 Ch1: 92

Do you think I have bad board? Thanks for your work in this field by the way

Ambient light Lux implementation isn't correct

For some reason, the ambient light reading are fine under normal lighting conditions. Ambient light values beyond 4096 are shown as negative numbers, don't know why.

Owner edit:

SI lux value are not correct because of my inability to understand the formulas in the datasheet properly. The procedure needs to be fixed, if anybody has the knowledge to do it properly, feel free to send a PR so we can close this :)

APDS9930 apds = APDS9930(); ?

I see it as correct but I keep getting error :-
On ProximitySensor.ino and
ProximityInterrupt.ino

Using library MDWire at version 1.0 in folder: C:\Users\cheetahkid\Dropbox\Project\libraries\MDWire
Using library APDS9930-master at version 1.5.1 in folder: C:\Users\cheetahkid\Dropbox\Project\libraries\APDS9930-master
exit status 1
redefinition of 'APDS9930 apds'

ProximitySensor example does not work

I cannot get the ProximitySensor to work. It seems to initialize but then gives the same range of readings over and over. Trying to read through the datasheet at the moment but am having difficulties understanding. Ambient light sensor example does work however.

Sensor is a cheapie from here: https://www.aliexpress.com/item/APDS-9930-Proximity-Sensor-Approaching-and-Non-Contact-Proximity-Module-CKIN/32746850298.html

22:40:06.003 -> ---------------------------
22:40:06.040 -> APDS-9930 - ProximitySensor
22:40:06.076 -> ---------------------------
22:40:06.076 -> APDS-9930 initialization complete
22:40:06.147 -> Proximity sensor is now running
22:40:06.147 -> 0: 0x5
22:40:06.185 -> 1: 0xED
22:40:06.185 -> 2: 0xFF
22:40:06.185 -> 3: 0xFF
22:40:06.185 -> 4: 0xFF
22:40:06.222 -> 5: 0xFF
22:40:06.222 -> 6: 0x0
22:40:06.222 -> 7: 0x0
22:40:06.222 -> 8: 0x0
22:40:06.260 -> 9: 0x0
22:40:06.260 -> A: 0x32
22:40:06.260 -> B: 0x0
22:40:06.260 -> C: 0x22
22:40:06.297 -> D: 0x0
22:40:06.297 -> E: 0x8
22:40:06.297 -> F: 0xAC
22:40:06.297 -> 12: 0x39
22:40:06.334 -> 13: 0x32
22:40:06.334 -> 14: 0xF6
22:40:06.334 -> 15: 0x0
22:40:06.334 -> 16: 0x1E
22:40:06.371 -> 17: 0x0
22:40:06.371 -> 18: 0xA9
22:40:06.371 -> 19: 0x1
22:40:06.371 -> 1E: 0x0
22:40:06.409 -> Proximity: 404
22:40:06.590 -> Proximity: 417
22:40:06.852 -> Proximity: 353
22:40:07.109 -> Proximity: 333
22:40:07.363 -> Proximity: 404
22:40:07.585 -> Proximity: 461
22:40:07.843 -> Proximity: 365
22:40:08.099 -> Proximity: 402
22:40:08.362 -> Proximity: 400
22:40:08.616 -> Proximity: 384
22:40:08.877 -> Proximity: 394
22:40:09.095 -> Proximity: 396
22:40:09.346 -> Proximity: 381
22:40:09.604 -> Proximity: 364
22:40:09.864 -> Proximity: 385
22:40:10.126 -> Proximity: 429
22:40:10.350 -> Proximity: 378
22:40:10.610 -> Proximity: 422

apds-9930 proximity sensor not working

I know that this is a duplicate but I am creating this in hope that some will explain in detail why some apds-9930 proximity sensor doesn't work even though ambient light does work

Answers I have seen:
Led is not getting any current -> how should it be powered then?
There is a pin to power the led -> can you not just say which one?

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.