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

feat: MQ135 Gas sensor added #1913

Merged
merged 1 commit into from
Aug 8, 2019
Merged

Conversation

neel1998
Copy link
Member

@neel1998 neel1998 commented Aug 6, 2019

Fixes #1912
Changes:Support for MQ135 added

Steps :

  1. Connect V of MQ135 to VDD
  2. Connect GND of MQ135 to GND
  3. Connect AO of MQ135 to CH1

Screenshot/s for the changes:
https://drive.google.com/file/d/1-KxOaqE_Y5EYquMkebYpBOEc0d7GAdLS/view?usp=sharing

Checklist: [Please tick following check boxes with [x] if the respective task is completed]

  • I have used resources from strings.xml, dimens.xml and colors.xml without hard-coding them
  • No modifications done at the end of resource files strings.xml, dimens.xml or colors.xml
  • I have reformatted code in every file included in this PR [CTRL+ALT+L]
  • My code does not contain any extra lines or extra spaces
  • I have requested reviews from other members

APK for testing:
mq135.zip

@CloudyPadmal @mariobehling @cweitat have a look. For now i haven't added the logging, because that would have made this PR too huge. I have also asked @ho-dor if he can help me with svg logo for the gas sensor. The basic functionality is working fine as can be seen in the video

Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@@ -849,6 +849,11 @@

<string name="no_baro_sensor">Device does not have a barometer</string>

<string name="gas_sensor">Gas Sensor</string>
<string name="gas_sensor_description">Detects amounts of gases in air</string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to the datasheet of that sensor and correct this to that specific gas.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Air Quality Sensor (MQ135) Description: Air quality sensor for detecting a wide range of gases, including NH3, NOx, alcohol, benzene, smoke and CO2

android:id="@+id/gas_sensor"
android:layout_width="match_parent"
android:layout_height="@dimen/speedometer_height"
android:padding="15dp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check for hard coded values

@@ -161,7 +166,8 @@ protected Void doInBackground(Void... params) {
R.string.compass_description,
R.string.gyroscope_description,
R.string.thermometer_desc,
R.string.robotic_arm_descriptoin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct this one's spelling along with this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for such blunders!. I type fast and then such mistakes get out of my attention. 😂

@cweitat cweitat changed the title Gas sensor added MQ135 Gas sensor added Aug 7, 2019
Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @neel1998

Can we get this fixed up?

@neel1998
Copy link
Member Author

neel1998 commented Aug 7, 2019

@CloudyPadmal yes I am doing it... making fixes is a while

@neel1998
Copy link
Member Author

neel1998 commented Aug 7, 2019

@CloudyPadmal done. We can ignore Codacy for now, since most of it will be solved once logging is added to gas sensor

@cweitat cweitat merged commit 1187402 into fossasia:development Aug 8, 2019
@CloudyPadmal CloudyPadmal added the Feature New addition to the existing app label Aug 8, 2019
@CloudyPadmal CloudyPadmal changed the title MQ135 Gas sensor added feat: MQ135 Gas sensor added Aug 8, 2019
@neel1998 neel1998 deleted the mq_135 branch August 27, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New addition to the existing app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for MQ 135 gas sensor
3 participants