esphome / esphome-core

🚨 No longer used 🚨 - The C++ framework behind ESPHome
https://esphome.io/
GNU General Public License v3.0
546 stars 114 forks source link

Feature request: MQ gas sensor #83

Closed delorean-dev closed 6 years ago

delorean-dev commented 6 years ago

I would like to see any support for the mq gas sensor it was be cool.

OttoWinter commented 6 years ago

So the MQ-2 gas sensors and similar ones should already be supported by the ADC Sensor. Basically, the MQ gas sensors just output an analog voltage that you need to convert using a formula.

In this case, the formula would be something like ((5.0-x)/x)/9.8. Look at the TEMT6000 cook book entry for inspiration. I haven't looked up how to hook it up yet, but it shouldn't be too difficult

OttoWinter commented 6 years ago

Closing as possible with ADC sensor already. Maybe I will write detailed instructions in the cookbook, but I'm closing this issue here as this is the code repo.