[riot-notifications] [RIOT-OS/RIOT] drivers: add gp2y10xx dust sensor (#15445)
Jean Pierre Dudey
notifications at github.com
Sun Nov 15 20:32:45 CET 2020
### Contribution description
This adds a driver for Sharp GP2Y1010AU0F/GP2Y1014AU0F Compact Optical Dust Sensors. There are some magic values in the code that don't make much sense but these are what I found on Waveshare et all Arduino code to convert ADC readings to ug/m3.
### Testing procedure
An example test is provided for the driver, it can be flashed as:
- `make -C tests/driver_gp2y10xx`
Make sure you set the `GP2Y10XX_PARAM_AOUT` (ADC line), `GP2Y10XX_PARAM_ILED`/`ILED_LEVEL` (GPIO pin connected to sensor's ILED) and `GP2Y10XX_PARAM_VREF` (ADC voltage reference) parameters for correct readings.
You may need to give it some smoke to see readings though since the sensor can't detect particulate below 50 ug/m3 levels, this said, it isn't recommended to use it as a fire/smoke detector because it's an unreliable device.
<sup>:warning: I do not endorse smoking a cigarette (as you may create an addiction) just to test it but a friend of a friend tested it and works :eyes:, melting a solder wire containing a flux core can be detected too though as an alternative</sup>
### Issues/PRs references
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* drivers: add gp2y10xx dust sensor
-- File Changes --
M drivers/Kconfig (1)
A drivers/gp2y10xx/Kconfig (26)
A drivers/gp2y10xx/Makefile (1)
A drivers/gp2y10xx/Makefile.dep (3)
A drivers/gp2y10xx/Makefile.include (2)
A drivers/gp2y10xx/gp2y10xx.c (186)
A drivers/gp2y10xx/gp2y10xx_saul.c (46)
A drivers/gp2y10xx/include/gp2y10xx_params.h (114)
A drivers/include/gp2y10xx.h (135)
A drivers/saul/init_devs/auto_init_gp2y10xx.c (70)
M drivers/saul/init_devs/init.c (4)
A tests/driver_gp2y10xx/Makefile (6)
A tests/driver_gp2y10xx/README.md (6)
A tests/driver_gp2y10xx/main.c (61)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications