Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Sharp GP2Y10 Dust sensor #7118

Closed
wants to merge 7 commits into from

Conversation

remmeha
Copy link

@remmeha remmeha commented Dec 5, 2019

Description:

Readout of Sharp GP2Y10XX dust sensor.
Readout of the sensor takes ~320us. Controlled by GPIO pin.

Related issue (if applicable): fixes #

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core 2.6.1
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

@stale
Copy link

stale bot commented Dec 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Action - Issue left behind - Used by the BOT to call for attention label Dec 31, 2019
@stale
Copy link

stale bot commented Jan 5, 2020

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.

@stale stale bot closed this Jan 5, 2020
@tnederlof19
Copy link

So where is this PR waiting for? Why isn't this merged?

@kofec
Copy link

kofec commented Apr 10, 2020

Hi, I tried your code but it was interpreted as Energy monitor :
08:43:20 RSL: SENSOR = {"Time":"2020-04-10T08:43:20","ANALOG":{"Energy":0.002,"Power":20,"Voltage":230,"Current":0.086},"ADS1115":{"A0":0,"A1":0,"A2":0,"A3":0}}

@kofec
Copy link

kofec commented Apr 11, 2020

OK, I found something. The analog assignment is wrong interpreted:
06:55:47 RSL: SENSOR = {"Time":"2020-04-11T06:55:47","ADS1115":{"A0":3317,"A1":3311,"A2":3310,"A3":3312},"GP2Y10":{"Air quality":48}}

@kofec
Copy link

kofec commented Apr 11, 2020

Ok, My mistake. I though that order doesn't matter:

// User selectable ADC0 functionality
enum UserSelectableAdc0 {
  ADC0_NONE,           // Not used
  ADC0_INPUT,          // Analog input
  ADC0_TEMP,           // Thermistor
  ADC0_LIGHT,          // Light sensor
  ADC0_BUTTON,         // Button
  ADC0_BUTTON_INV,
  ADC0_RANGE,          // Range
  ADC0_CT_POWER,       // Current
//  ADC0_SWITCH,         // Switch
//  ADC0_SWITCH_INV,
  ADC0_GP2Y10,         // Sharp GP2Y10XX Dust sensor
  ADC0_END };

@kofec
Copy link

kofec commented Apr 11, 2020

And I change
#define XSNS_66 66
because 58 is busy now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Action - Issue left behind - Used by the BOT to call for attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants